[Kmymoney-devel] Review Request: Add a cache to isProcessingDay to speed up holiday queries
Alvaro Soliverez
asoliverez at kde.org
Sun Aug 15 15:56:20 CEST 2010
> On 2010-08-15 13:14:50, Fernando Vilas wrote:
> > If it's raw speed you're after, QHash should beat QMap, though it probably does not matter much in this case.
> >
> > d->m_holidayMap[(*holiday_it).date()] = false;
> > Also, the above code creates the element in the map if it does not exist, then assigns a value to it. For a bool it is not a big deal, but in the general case your original insert() statement is faster, especially for objects with expensive ctors.
> >
> > Other than that, it looks good to me. Tested on Slackware-current with KDE SC 4.5RC3 for both backends.
- The QMap will have about 600-900 items at most. It shouldn't have problems but we can change it quickly if needed.
- [] vs insert. Tell that to the other guy. I'd rather call insert too. Changed. :)
- Alvaro
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/5033/#review7068
-----------------------------------------------------------
On 2010-08-15 12:11:09, Alvaro Soliverez wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/5033/
> -----------------------------------------------------------
>
> (Updated 2010-08-15 12:11:09)
>
>
> Review request for kmymoney.
>
>
> Summary
> -------
>
> This is a quick and dirty fix to cache the calls to HolidayRegion. The best solution would be to call the holiday list and load that preemptively for a given period of time.
>
>
> This addresses bug 247912.
> https://bugs.kde.org/show_bug.cgi?id=247912
>
>
> Diffs
> -----
>
> /trunk/extragear/office/kmymoney/kmymoney/kmymoney.h 1163570
> /trunk/extragear/office/kmymoney/kmymoney/kmymoney.cpp 1163570
>
> Diff: http://reviewboard.kde.org/r/5033/diff
>
>
> Testing
> -------
>
> Tested it with region set to none and region set to Argentina.
>
>
> Thanks,
>
> Alvaro
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kmymoney-devel/attachments/20100815/303b31d1/attachment.htm
More information about the KMyMoney-devel
mailing list