[Kmymoney-devel] Review Request: Add a cache to isProcessingDay to speed up holiday queries

Thomas Baumgart thb at net-bembel.de
Sun Aug 15 08:53:19 CEST 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/5033/#review7058
-----------------------------------------------------------



/trunk/extragear/office/kmymoney/kmymoney/kmymoney.cpp
<http://reviewboard.kde.org/r/5033/#comment7120>

    A QMap has a default ctor which clears it. So this is not needed.



/trunk/extragear/office/kmymoney/kmymoney/kmymoney.cpp
<http://reviewboard.kde.org/r/5033/#comment7123>

    The whole logic of this method must be enclosed in
    
    #if KDE_IS_VERSION(4,5,0)
    :
    :
    #endif
    
    so that it will work with KDE < 4.5 since the holidays(QDate, QDate) method does not exist prior to 4.5 (from the doc)
    
    Tested here on 4.3.5



/trunk/extragear/office/kmymoney/kmymoney/kmymoney.cpp
<http://reviewboard.kde.org/r/5033/#comment7121>

    What would be the penalty if you grab two full years of information at this point? That should cover some reports also. Just an idea.



/trunk/extragear/office/kmymoney/kmymoney/kmymoney.cpp
<http://reviewboard.kde.org/r/5033/#comment7122>

    I'd use
    
      d->m_holidayMap[(*holiday_it).date()] = false;
    
    but that is personal taste. Also applies for other code lines as well.


- Thomas


On 2010-08-15 03:53:10, Alvaro Soliverez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/5033/
> -----------------------------------------------------------
> 
> (Updated 2010-08-15 03:53:10)
> 
> 
> 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/ee92fa3b/attachment-0001.htm 


More information about the KMyMoney-devel mailing list