Review Request 120927: Fix selecting large directories for uploading
Aleix Pol Gonzalez
aleixpol at kde.org
Fri Oct 31 18:19:49 UTC 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120927/#review69605
-----------------------------------------------------------
Ship it!
Seems logical to me. \o/
- Aleix Pol Gonzalez
On Oct. 31, 2014, 5:59 p.m., Jakub Caban wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120927/
> -----------------------------------------------------------
>
> (Updated Oct. 31, 2014, 5:59 p.m.)
>
>
> Review request for KDevelop.
>
>
> Repository: kdev-upload
>
>
> Description
> -------
>
> That one was actually bothering me for a long time. As in the files dialog when choosing large directory or using "select all" KDevelop hunged to the point it had to be killed. In the best case scenario after long waiting it could respond. Took me some time to figure out the culprint.
>
> In the current situation recursive file selecting worked like that:
> - go into foo/
> - emit dataChanged for foo/
> - go into foo/bar/
> - emit dataChanged for foo/bar/
> - emit dataChanged for foo/
> - take file foo/bar/file.txt
> - emit dataChanged for foo/bar/file.txt
> - emit dataChanged for foo/bar/
> - emit dataChanged for foo/
> - ...
>
> ...and so on - I think you see what's going on there already. Things got extremely wrong with deeply nested directories and many files in them.
>
> As a solution I've removed this "look back" mechanism and am acutally emiting signal only for currently analyzed entry. So example looks like:
> - go into foo/
> - emit dataChanged for foo/
> - go into foo/bar/
> - emit dataChanged for foo/bar/
> - take file foo/bar/file.txt
> - emit dataChanged for foo/bar/file.txt
> - ...
>
> So that for each file or dir dataChanged is emitted at most once.
>
> This have changed time of selecting all project files for upload at my random project from infinity to less than blink of an eye.
>
>
> Diffs
> -----
>
> uploadprojectmodel.cpp b6d2d9d
>
> Diff: https://git.reviewboard.kde.org/r/120927/diff/
>
>
> Testing
> -------
>
> Code compiles and works in every scenario that came to my head:
> - selecting all files and uploading them
> - selecting only one file (nested or not) and uploading it (as upload process actually takes care of creating directories).
> - selecting all directory or subdirectory inside project folder for uploading
> - using quick upload
>
>
> Thanks,
>
> Jakub Caban
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20141031/8253665d/attachment-0001.html>
More information about the KDevelop-devel
mailing list