https://bugs.kde.org/show_bug.cgi?id=449868
--- Comment #10 from john.f...@gmail.com ---
Thanks for providing the link to the other bug report.  I understand why this
change was made now, however, I did some playing on my 5.23.5 and 5.24.0 VMs
and I think that the patch to fix the 444585 bug may also a bug.  The
calculation will always be zero (0).

The spacing calculation was a simple round integer calculation.  Chart width
divided by 20.  I didn't dig through the code, but I was able to infer based on
the example calculations below that the bar width on the panel view is 9px and
the bar width in the pop-up chart is 17px.

Have a look at these examples, which I confirmed the results by measuring the
pixels in GIMP:

Under 5.23.5 with the old spacing calculation:
  8 sensors:
    - Panel view - 34px / 20 = 1.7 rounds to 2, yielding a bar width of 7px
    - Pop-up view - 112px / 20 = 5.6 rounds to 6, yielding a bar width of 11px

  20 sensors:
    - Panel view - 173px / 20 = 8.65 rounds to 9, yielding a bar width of 0px
    - Pop-up view - 320px / 20 = 16px, which is exactly what I measure with
GIMP, yielding a bar width of 1px 

Under 5.24.0:
  25 sensors
    - Panel view - (225px / 25) * 0.05 = 0.454 floor of 0, yielding a bar width
of 9px
    - Pop-up view - (418px / 25) * 0.05 = 0.836 floor of 0, yielding a bar
width of 17px

  28 sensors:
    - Panel view - (254px / 28) * 0.05 = 0.455 floor of 0, yielding a bar width
of 9px
    - Pop-up view - (472px / 28) * 0.05 = 0.843 floor of 0, yielding a bar
width of 17px

So as the chart width scales up with the number of sensors, the floor
calculation for the spacing will always be 0.  Even if that was switched to
round instead of floor, it would always be a 1 so it's moot to have either
calculation.

Ultimately it would be nice to have the spacing as a user configurable value
for those with high core/thread count CPUs, but I understand that would take
GUI changes to make that available.  A quick and simple solution is to set the
spacing to a fixed 2px size rather than using either calculation which will
yield a very quick and easy to read graph that scales well in both views.  

Thanks!

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to