Bug 383089

Summary: Diagrams does not have antialising enabled
Product: [Applications] kmymoney Reporter: Ralf Habacker <ralf.habacker>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal CC: lukasz.wojnilowicz
Priority: NOR    
Version: 4.8.0   
Target Milestone: ---   
Platform: Other   
OS: All   
Latest Commit: Version Fixed In: 4.8.1,5.0.0
Sentry Crash Report:

Description Ralf Habacker 2017-08-03 14:44:28 UTC
xtemp09@gmail.com reported at bug 383044 that kmymoney diagrams do not have antialising enabled.

Enabling antialising gives diagrams a better look.
Comment 1 Ralf Habacker 2017-08-03 14:48:32 UTC
Git commit d97bd3c6b4ebebc4e1510b8299428e699e94c153 by Ralf Habacker.
Committed on 03/08/2017 at 14:48.
Pushed by habacker into branch '4.8'.

Fix 'Diagrams does not have antialising enabled'

FIXED-IN:4.8.1

M  +1    -0    kmymoney/reports/kreportchartview.cpp

https://commits.kde.org/kmymoney/d97bd3c6b4ebebc4e1510b8299428e699e94c153
Comment 2 wojnilowicz 2017-08-03 16:46:33 UTC
(In reply to Ralf Habacker from comment #0)
> xtemp09@gmail.com reported at bug 383044 that kmymoney diagrams do not have
> antialising enabled.
> 
> Enabling antialising gives diagrams a better look.

It also hits performance. Antialising should be user selectable.
Comment 3 Ralf Habacker 2017-08-03 19:15:07 UTC
(In reply to NSLW from comment #2)
> (In reply to Ralf Habacker from comment #0)
> > xtemp09@gmail.com reported at bug 383044 that kmymoney diagrams do not have
> > antialising enabled.
> > 
> > Enabling antialising gives diagrams a better look.
> 
> It also hits performance. Antialising should be user selectable.
You have a test case showing this performance issue ? 

I was not able to see any major differences. What I did:
1. I did set KChart::KChart::AbstractDiagram::Private::doDumpPaintTime = true;
2. loaded attachment 106680 [details] once with antialising and once without.
3. opened net work graph
4. set Configure->rows/column->columns to daily and got 

with antialising
Painting diagram 0 took 8 milliseconds 
Painting diagram 0 took 8 milliseconds 
Painting diagram 0 took 8 milliseconds 
Painting diagram 0 took 10 milliseconds 
Painting diagram 0 took 12 milliseconds 
Painting diagram 0 took 14 milliseconds 
Painting diagram 0 took 9 milliseconds 
Painting diagram 0 took 14 milliseconds 
Painting diagram 0 took 11 milliseconds 
Painting diagram 0 took 10 milliseconds 
Painting diagram 0 took 11 milliseconds 
Painting diagram 0 took 181 milliseconds 
Painting diagram 0 took 171 milliseconds 
Painting diagram 0 took 169 milliseconds 
Painting diagram 0 took 172 milliseconds 
Painting diagram 0 took 177 milliseconds 
Painting diagram 0 took 170 milliseconds 
Painting diagram 0 took 193 milliseconds 
Painting diagram 0 took 170 milliseconds 
Painting diagram 0 took 192 milliseconds 
Painting diagram 0 took 175 milliseconds 

without antialising
Painting diagram 0 took 8 milliseconds 
Painting diagram 0 took 8 milliseconds 
Painting diagram 0 took 8 milliseconds 
Painting diagram 0 took 8 milliseconds 
Painting diagram 0 took 9 milliseconds 
Painting diagram 0 took 8 milliseconds 
Painting diagram 0 took 12 milliseconds 
Painting diagram 0 took 9 milliseconds 
Painting diagram 0 took 13 milliseconds 
Painting diagram 0 took 9 milliseconds 
Painting diagram 0 took 173 milliseconds 
Painting diagram 0 took 169 milliseconds 
Painting diagram 0 took 170 milliseconds 
Painting diagram 0 took 167 milliseconds 
Painting diagram 0 took 171 milliseconds 
Painting diagram 0 took 179 milliseconds 
Painting diagram 0 took 197 milliseconds
Comment 4 wojnilowicz 2017-08-03 19:22:36 UTC
That's common knowledge. Please read
https://en.wikipedia.org/wiki/Spatial_anti-aliasing

and especially this

"In computer graphics, anti-aliasing improves the appearance of polygon edges, so they are not "jagged" but are smoothed out on the screen. However, it incurs a performance cost for the graphics card and uses more video memory. The level of anti-aliasing determines how smooth polygon edges are (and how much video memory it consumes)."


On your computer (and your test case) you may see no performance difference, but user computers can be less powerful or have heavier load cases. That's why you shouldn't enforce performance sensitive option.
Comment 5 Christoph Feck 2017-08-03 20:10:48 UTC
Qt developers optimized the anti-aliasing code paths, but not the others. It is an old myth that it is slow.
Comment 6 wojnilowicz 2017-08-04 14:05:25 UTC
(In reply to Christoph Feck from comment #5)
> Qt developers optimized the anti-aliasing code paths, but not the others. It
> is an old myth that it is slow.

Optimized doesn't mean faster than non-anti-aliasing paths. If it would be so, then developers would enable it by default.

I just think that user should decide here.

BTW.
Isn't Qt has it's own competitive charting library by the name QtCharts?