[KDev4] Opening project with real ASync way

dukju ahn dukjuahn at gmail.com
Sun May 27 12:36:43 UTC 2007


2007/5/27, dukju ahn <dukjuahn at gmail.com>:
> It works very well. But there is one problem. Because now
> ProjectBaseItems are created on separated thread, we can't invoke
> setIcon() at the constructor of ProjectBaseItem and its subclasses.
> Otherwise it segfaulted. Especially KIO::pixmapForUrl() was the reason
> of crash.
>
> One solution would be to invoke setIcon() in the slot connected to
> KJob::done(). Starting from top item, we go recursively into every
> children and call childItem->setIcon().

Here is the completed patch. The advantages are two

1. GUI doesn't hang while openning a big project

2. Project parsing became much faster because the setIcon() in each
ProjectBaseItem isn't invoked for full recursive file/dirs. Rather, we
just setIcon() only for toplevel items. Icon for Children items are set up
when the user expands treeview.
I've found that setIcon() is very time-consuming operation.

Actually, Number 2 was some workaround for the problem above.
Ironically, it brought much better performance.

If Nobody disagree, I'll commit it at monday.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asyncopen-managerview.patch
Type: text/x-diff
Size: 1655 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20070527/fd4dc452/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asyncopen-project.patch
Type: text/x-diff
Size: 9280 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20070527/fd4dc452/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asyncopen-shell.patch
Type: text/x-diff
Size: 4396 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20070527/fd4dc452/attachment-0002.bin>


More information about the KDevelop-devel mailing list