> On April 27, 2016, 11:59 p.m., David Edmundson wrote:
> > I think you've spotted a problem, but this patch is treating the symptom 
> > not the cause.
> > 
> > According to my logs, the constant loading of kdeglobals comes from:
> >   - 50x loading .protocol files (which shouldn't be including kdeglobals)
> >   - 10x loading .directory files (which shouldn't be including kdeglobals)
> >   - baloofilerc being loaded 8 times. (this is bug in baloo, it should 
> > probably include globals but only once)
> >   - frameworks integration explicitly loading kdeglobals. (this is a bug in 
> > frameworks integration)
> >   - knfsshare
> > 
> > With everything fixed that will be "only" loading it 3 times.
> > 
> > That still means this will have some value, but a much smaller one.

On the other hand it is a fact that every time you load KConfig, you'll have to 
go through the globals. This won't be a problem for dolphin (which was just an 
example) but will be for the rest. For example, most of KDevelop plugins will 
have a KConfig used. I understand that it makes sense to leverage such 
locality. Furthermore, caching doesn't only save us the reading and parsing, 
but also lets us save quite some QString instance (since if you parse twice, 
QString will allocate twice, whereas if you copy it will implicitly share).

On the other hand, I completely agree that fixing those abuses is important and 
should be done.


- Aleix


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127765/#review94923
-----------------------------------------------------------


On April 27, 2016, 6:14 p.m., Aleix Pol Gonzalez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127765/
> -----------------------------------------------------------
> 
> (Updated April 27, 2016, 6:14 p.m.)
> 
> 
> Review request for KDE Frameworks and Matthew Dawson.
> 
> 
> Repository: kconfig
> 
> 
> Description
> -------
> 
> A next step for my little quest is improving KConfig impact upon start.
> 
> In callgrind terms, 20% of dolphin's startup time is KConfig and 15% is 
> parsing global files, which is essentially loading kdeglobals 70 times. This 
> of course also means that kdeglobals is scattered 70 times in each 
> application's memory space.
> 
> To improve such situation, here's an attempt to cache these. I'm not an 
> expert in KConfig, so feedback is really appreciated 
> [[1]](http://i1.kym-cdn.com/photos/images/facebook/000/234/765/b7e.jpg)
> 
> 
> Diffs
> -----
> 
>   src/core/kconfig.cpp ad52da9 
> 
> Diff: https://git.reviewboard.kde.org/r/127765/diff/
> 
> 
> Testing
> -------
> 
> Tests pass, KConfig becomes 6% of dolphin at load.
> 
> 
> Thanks,
> 
> Aleix Pol Gonzalez
> 
>

_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel

Reply via email to