KDirWatch and kdevelop idle CPU usage (4.7/1.7)
Kevin Funk
kfunk at kde.org
Tue Apr 21 11:44:27 BST 2015
On Monday, April 20, 2015 23:22:45 René J.V. Bertin wrote:
> On Monday April 20 2015 22:48:47 Milian Wolff wrote:
> > It's a switch that picks the "best" option available. Afaik inotify on
> > Linux, then FAM, then QFSWatcher and then stat.
>
> Something like that, yes.
>
> > Independently, the user afaik still
> > has the ability to pick another option when multiple are available
> > (required e.g. for proper NFS support).
>
> I vaguely recall that we had to override a new default after a kdelibs
> 4.12.x upgrade.
> > > Anyway, QFileSystemWatcher isn't an option for the large projects where
> > > idle usage becomes an issue with polling: kdevelop is aborted very
> > > quickly because of too many open files :(
> >
> > Aborted? Why that?!
>
> In this case it was collateral damage so to speak:
> QProcessPrivate::createPipe: Cannot create pipe 0x7fe5569d2e18: Too many
> open files
>
> * thread #1: tid = 0x7bd6fe, 0x00007fff89041e20
> libsystem_kernel.dylib`__wait4 + 8, queue = 'com.apple.main-thread', stop
> reason = signal SIGSTOP * frame #0: 0x00007fff89041e20
> libsystem_kernel.dylib`__wait4 + 8 frame #1: 0x000000010f1efaae
> libkdeui.5.dylib`KCrash::startProcess(int, char const**, bool) [inlined]
> startProcessInternal(argc=<unavailable>, directly=<unavailable>) + 265 at
> kcrash.cpp:556 frame #2: 0x000000010f1ef9a5
> libkdeui.5.dylib`KCrash::startProcess(argc=<unavailable>,
> argv=<unavailable>, waitAndExit=<unavailable>) + 21 at kcrash.cpp:538 frame
> #3: 0x000000010f1eebd9
> libkdeui.5.dylib`KCrash::defaultCrashHandler(sig=<unavailable>) + 1209 at
> kcrash.cpp:441 frame #4: 0x00007fff8eee65aa
> libsystem_platform.dylib`_sigtramp + 26 frame #5: 0x00000001209f5ee5
> libsvn_subr-1.0.dylib`svn_config_set + 30 frame #6: 0x00000001208dc6f6
> kdevsubversion.so`svn::Context::Data::Data(this=0x00007fe556693600,
> configDir_=<unavailable>) + 630 at context.cpp:216 frame #7:
> 0x00000001208dc122
> kdevsubversion.so`svn::Context::Context(std::__1::basic_string<char,
> std::__1::char_traits<char>, std::__1::allocator<char> > const&) [inlined]
> svn::Context::Context(this=0x00007fe5560656d0, configDir=<unavailable>) +
> 34 at context.cpp:637 frame #8: 0x00000001208dc100
> kdevsubversion.so`svn::Context::Context(this=0x00007fe5560656d0,
> configDir=<unavailable>) + 16 at context.cpp:638 frame #9:
> 0x00000001208b10ee
> kdevsubversion.so`SvnInternalJobBase::SvnInternalJobBase(this=0x00007fe5566
> 93440, parent=0x00007fe556693270) + 94 at svninternaljobbase.cpp:49 frame
> #10: 0x00000001208c208f
> kdevsubversion.so`SvnInfoJob::SvnInfoJob(this=0x00007fe556693270,
> parent=<unavailable>) + 95 at svninfojob.cpp:96 frame #11:
> 0x00000001208a6cce
> kdevsubversion.so`KDevSvnPlugin::isVersionControlled(this=<unavailable>,
> localLocation=0x00007fff51ec8bc0) + 62 at kdevsvnplugin.cpp:108 frame #12:
> 0x000000010ddc908f
> libkdevplatformshell.8.dylib`KDevelop::ProjectPrivate::loadVersionControlPl
> ugin(this=0x00007fe556660000, projectGroup=0x00007fff51ec8c70) + 831 at
> project.cpp:402
> > > with if it keeps idle CPU usage down. It'd be more annoying if the
> > > detection of external changes to open files is affected too.
> >
> > It is also affected afaik.
For the record: QtC modifies the limit of the number of files that can be opened
specifically on OSX.
Might be worth investigating whether that helps us as well.
295│ #ifdef Q_OS_MAC
296│ // increase the number of file that can be opened in Qt Creator.
297│ struct rlimit rl;
298│ getrlimit(RLIMIT_NOFILE, &rl);
299│
300│ rl.rlim_cur = qMin((rlim_t)OPEN_MAX, rl.rlim_max);
301│ setrlimit(RLIMIT_NOFILE, &rl);
302│ #endif
@Rene, care to try this out?
> We'll see whether I'll want to increase or decrease the polling frequency.
> I could also see if there doesn't exist a native method on OS X...
>
> Cheers,
> R.
> _______________________________________________
> KDevelop mailing list
> KDevelop at kde.org
> https://mail.kde.org/mailman/listinfo/kdevelop
--
Kevin Funk | kfunk at kde.org | http://kfunk.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/20150421/fff87479/attachment.sig>
More information about the KDevelop
mailing list