Review Request 110686: Reduce KFileItemModel memory usage by implicitly sharing QByteArrays
Mark Gaiser
markg85 at gmail.com
Mon Jun 3 12:23:51 BST 2013
> On May 29, 2013, 5:45 p.m., Mark Gaiser wrote:
> > Hi Frank,
> >
> > I noticed this ticket and took a small nose dive in string optimization. Your approach (as well as the kmail version) is simple and effective, that's for sure!
> >
> > However, i think it can be done even more effective. If you would do the same only using a Trie (http://en.wikipedia.org/wiki/Trie or one of it's variants) then you would gain a whole lot more. Then you get very cheap string completion when searching (or typing in the url bar) and the memory usage will go down even more.
> >
> > Funnily enough, Qt (or actually Qt Creator) has a documented Trie implementation: http://doc-snapshot.qt-project.org/qtcreator-extending/qmljs-persistenttrie-trie.html The downside is that you can't use it directly. You would have to copy the class either into dolphin or into kdelibs from frameworks (which would make it pointless for the current dolphin). It's quite a bummer that Qt doesn't come with a Trie like class naively.
> >
> > I'm guessing you won't go this route due to more files to maintain, but it certainly is worth to take a look at it :)
>
> Frank Reininghaus wrote:
> Hi Mark, thanks for your comments, but I fail to see the connection between Tries and implicit sharing of the QByteArrays that are used for indexing the 'roles' of the items.
Hi Frank,
I noticed that small but important shortcoming as well :) Using Tries will give you other benefits but won't help you the least bit with regards to implicit sharing. Sorry for that.
- Mark
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110686/#review33370
-----------------------------------------------------------
On May 28, 2013, 4:44 a.m., Frank Reininghaus wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110686/
> -----------------------------------------------------------
>
> (Updated May 28, 2013, 4:44 a.m.)
>
>
> Review request for Dolphin.
>
>
> Description
> -------
>
> The summary says it all. The idea is based on http://milianw.de/blog/katekdevelop-sprint-vienna-2012-take-1
>
>
> Diffs
> -----
>
> dolphin/src/kitemviews/kfileitemmodel.h 1d837cb
> dolphin/src/kitemviews/kfileitemmodel.cpp d30d9e5
>
> Diff: http://git.reviewboard.kde.org/r/110686/diff/
>
>
> Testing
> -------
>
> Opened a directory with 100000 files with the default view properties. Memory usage as reported by ksysguard is reduced from 309 MB to 280.5 MB.
>
>
> Thanks,
>
> Frank Reininghaus
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20130603/91549899/attachment.htm>
More information about the kfm-devel
mailing list