Review Request 111048: Prevent Konqueror from performing lots of stat calls during session auto save
David Faure
faure at kde.org
Mon Jun 17 11:12:36 BST 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111048/#review34473
-----------------------------------------------------------
This part looks good.
You can't remove "deleteOwnedSessions" -- but since this is about a directory created by this process, a bool flag could be used to determine if we created it or not, and then it wouldn't be necessary to stat() it.
konqueror/src/konqsessionmanager.cpp
<http://git.reviewboard.kde.org/r/111048/#comment25303>
I'm not sure why you splitted this into two lines. With QStringBuilder, I assume a+b is faster nowadays.
konqueror/src/konqsessionmanager.cpp
<http://git.reviewboard.kde.org/r/111048/#comment25304>
m_autoSavedSessionConfig is unused now, right? Did you forget to remove its declaration?
- David Faure
On June 16, 2013, 1:46 p.m., Dawit Alemayehu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111048/
> -----------------------------------------------------------
>
> (Updated June 16, 2013, 1:46 p.m.)
>
>
> Review request for KDE Base Apps and David Faure.
>
>
> Description
> -------
>
> The attached patch changes KonqSessionManager such that it creates an instance of the auto save session KConfig object once during initialization instead of each time it is invoked, which is about every 10 secs. This stops the flood of "stat" calls from Konqueror that occur every 10 secs even when Konqueror is doing absolutely nothing. The problem and its fix can be tested by running Konqueror through strace, "strace -e stat konqueror".
>
> The result of this fix is the number of stat calls Konqueror makes every 10 secs went down to 1 from 15. Even that remaining stat call can be stopped if I was certain that removing the "deleteOwnedSessions" call from autoSaveSession won't cause any regression. David?
>
>
> Diffs
> -----
>
> konqueror/src/konqsessionmanager.cpp 1a55c7a
>
> Diff: http://git.reviewboard.kde.org/r/111048/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Dawit Alemayehu
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20130617/e478464b/attachment.htm>
More information about the kde-core-devel
mailing list