News from SharedUrls land

Milian Wolff mail at milianw.de
Wed Dec 5 02:02:07 UTC 2012


Hey all,

I want to invite you all to review my sharedurls branch and maybe even start 
helping out in the refactoring/proting effort. It's mostly about finding 
deprecation warnings and using KDevelop::Path instead of KUrl where 
appropriate.

I decided to follow Andreas' suggestion of naming the new type "Path" instead 
of URL or such, since it really is that - a path. It might be remote or local, 
yes. But it still points to a file or folder and cannot have any fancy URL 
features like fragments or queries.

Anyhow, here are some things I notice while porting some code:

- the new class is much more convenient as you do not have to care about 
potential trailing slashes for folders
- the new class follows our needs from a project manager pov better, you 
usually have some base path and a QString you want to append, which is trivial 
and fast with the new type
- the new class is saving quite some memory and time (see below)
- we use KUrl quite a lot which means we'll have to port a lot of code to get 
a clean port

When comparing performance, I looked at importing the Qt4 source tree into 
KDevelop with the background parser disabled.

Before (i.e. current master):
heap memory levels at around 185MB after around 9s.

After:
heap memory levels at around 129MB after around 8s.

So: We save ~30% of memory and are ~11% faster. Do you agree this is worth it? 
Oh and I'll also send some numbers on bigger projects on Thursday, using my 
WebKit checkout at work. 

Cheers
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20121205/a9604b73/attachment.sig>


More information about the KDevelop-devel mailing list