Review Request 111870: KDirWatch, make a little bit better use of inotify and prevent a stat call
Mark Gaiser
markg85 at gmail.com
Sun Aug 4 00:34:18 BST 2013
> On Aug. 3, 2013, 10:27 p.m., Milian Wolff wrote:
> > kdecore/io/kdirwatch.cpp, line 327
> > <http://git.reviewboard.kde.org/r/111870/diff/1/?file=176087#file176087line327>
> >
> > why did you move that outside? is this being used elsewhere? if so, I can't see it by the diff apparently.
Well, no. it's not being used outside, but that exact line was created in three if statements and i moved it up one level. That seemed cleaner to me, i guess i can move it back if you want to. Do note that there are only 4 if statements there so only one case where the line wouldn't be created otherwise.
> On Aug. 3, 2013, 10:27 p.m., Milian Wolff wrote:
> > kdecore/io/kdirwatch.cpp, line 372
> > <http://git.reviewboard.kde.org/r/111870/diff/1/?file=176087#file176087line372>
> >
> > the indentation is broken here, no? should be two spaces like the rest of the file.
Actually, the kdirwatch.cpp file is broken in it's entirety when it comes to indentation. I followed the kdelibs coding style (4 spaces) and kdirwatch is using a mixture of 2 and 4 spaces. Do you suggest that i use the "mixed" indentation style for this patch to match the file or the kdelibs style?
> On Aug. 3, 2013, 10:27 p.m., Milian Wolff wrote:
> > kdecore/io/kdirwatch.cpp, line 545
> > <http://git.reviewboard.kde.org/r/111870/diff/1/?file=176087#file176087line545>
> >
> > isDir looks like an outparam but is used like an in-param here. will this work for all cases where this function is being called when inotify is present?
Yes, this works for all cases with inotify.
- Mark
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111870/#review37041
-----------------------------------------------------------
On Aug. 3, 2013, 9:28 p.m., Mark Gaiser wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111870/
> -----------------------------------------------------------
>
> (Updated Aug. 3, 2013, 9:28 p.m.)
>
>
> Review request for kdelibs and David Faure.
>
>
> Description
> -------
>
> At first i wasn't intending to even ask a reviewrequest for this because i want to fix an issue that is well described in my thread: "KDirWatch bug and the analysis. Help is welcome!" on kde-core-devel. However, while starting on fixing that issue i noticed that this would be a nice small improvement to have. It also prevents one stat call that was used to determine if "entry" was a file or folder, but inotify already gives us that information.
>
>
> Diffs
> -----
>
> kdecore/io/kdirwatch.cpp 95ee3d3
>
> Diff: http://git.reviewboard.kde.org/r/111870/diff/
>
>
> Testing
> -------
>
> Compiles just fine.
> Runs fine, i haven't seen any issues thus far.
> Oh and it passes all kio test cases but i specially note the following:
> kdirwatchtest
> kdirlistertest
> kdirmodeltest
>
>
> Thanks,
>
> Mark Gaiser
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20130803/78130064/attachment.htm>
More information about the kde-core-devel
mailing list