traceshark icon indicating copy to clipboard operation
traceshark copied to clipboard

Graphs too small with many CPUs

Open Mic92 opened this issue 5 years ago • 7 comments

On HiDPI displays the icons do not scale, while the font does. Also the graph view is not readable as it is too small.

2020-05-18_13-23

Could the graph view maybe has a scrollbar so that each graph has a minimum hight? I use a 13 inch screen with a 3840x2160 resolution.

Mic92 avatar May 18 '20 12:05 Mic92

Regarding the current situation (tip of master branch):

There are two principal ways to deal with many CPUs:

  1. There is an obscure way to zoom and scroll in the vertical direction. This is documented under the heading "1.1.1 How to zoom and scroll vertically". Basically, you need to select the vertical axis by clicking on it, then the zoom and scroll will be vertical instead of horizontal. A weak point with this is that it requires a mouse with a mouse wheel.

  2. To disable unwanted graphs. In the menu: "View" -> "Select Graphs", or by clicking the corresponding icon. If you for example only are interested in the scheduling graphs, then you can make them more than twice as big by disabling the cpu idle, cpu frequency, and migration graphs. This menu also lets you select the how thick the lines in the scheduling graphs should be.

I am afraid that the the way icons are handled is not HiDPI friendly, since they are stored as 30x30 pixmaps.

Regarding potential future development:

  1. With the benefit of hindsight, I feel that the way to enable vertical scrolling and zooming ought to be less obscure, perhaps a button and a menu entry. I guess most people will not guess that vertical scrolling and zooming can be enabled by clicking on the vertical axis and nobody reads the documentation for how to use a GUI.

  2. I guess that it would be desirable to also be able to increase the line width of the other graphs in the graph enable dialog, not just the scheduling graphs.

  3. A possible feature would be to let the user via a dialog select that graphs should only be drawn for subset of all available CPUs. I have thought about this but so far I have decided against it because, I feel that most of the time all CPUs are of more or less of equal interest.

  4. I have luckily drawn the icons with vector graphics, so it should be possible to either move from PNG to SVG, or at least increase the resolution of the PNG files.

cunctator avatar May 18 '20 22:05 cunctator

Can you tell me the following:

  1. Does the vertical zoom and scroll work for you, as described in Section "1.1.1 How to zoom and scroll vertically" of the README.md ?

  2. Do you think it would help users to find it if it could be enabled with a button in the UI (and a menu entry in the View menu) perhaps an icon with a magnifying glass and a vertical axis?

  3. ...or do you think that there must be a scrollbar? Why? Would the scrollbar be used for zooming also?

  4. Do you think it would be helpful to be able to select that only a subset of CPUs should be shown?

cunctator avatar May 18 '20 22:05 cunctator

Thanks. I did missed this part of the documentation and just assumed this was not working because the app was not optimized for my screen. Zooming works now for me. Right now there is no indication that the graphs are clickable. One could probably add some symbols/hover text to indicate that but I think most people already know how to use a scroll-bar.

Mic92 avatar May 18 '20 22:05 Mic92

The way to go for hidpi icons seems to be adding upscaled icons: https://doc.qt.io/qt-5/qicon.html#high-dpi-icons

Mic92 avatar May 18 '20 22:05 Mic92

quick fix for the HiDPI problem: https://github.com/cunctator/traceshark/pull/4

Mic92 avatar May 18 '20 23:05 Mic92

I merged the pull request but I think that I will keep this issue open until I have changed the icons to be either high resolution or SVG and tried to make the vertical zoom less obscure.

cunctator avatar May 19 '20 19:05 cunctator

I believe that all the issues discussed in this ticket have been addressed now. However, I don't have a HiDPI system to test with, so HiDPI testing with a screenshot would be appreciated.

The following changes have been to improve the situation:

  • The pull request with QApplication::setAttribute(Qt::AA_EnableHighDpiScaling) was merged.

  • I changed the icons from 30x30 PNG files to SVG format and addded QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps). I believe that this should improve the appearance of the icons on HiDPI systems.

  • There are new combo boxes in the graph enable dialog that lets the user change the thickness of the frequency, idle, and migration graphs. Previously, it was only possible to change the thickness of the scheduling graphs. Note, that this is not done automatically; the user must adjust these values manually. Making the various graphs thicker would probably be beneficial for users with HiDPI screens. To display the graph enable dialog, push the image button.

  • I have changed the default zoom so that when the trace has many CPUs, only a portion of the vertical space is displayed and a QScrollbar is shown. The appearance of the default zoom button has also changed, it now looks like this: image.

  • The image button that previusly was used for the default zoom is now the "full zoom" button and pushing it shows the full trace, i.e. it does the same as it did before when it was the default zoom button.

  • I have added a new image button that enables vertical scrolling and zoom, its state is synced with the selection state of the vertical axis. This should make it easier for a new user to find the vertical zooming without reading the documentation.

cunctator avatar Jul 05 '20 18:07 cunctator

There have been no activity on this for over 3 years. I have tried to fix the issues but I am unable to test because I don't have a HiDPI system and I am unlikely to buy one.

I will close this under the assumption tat the issue has been solved. If there are still HiDPI problem, please open a new issue.

cunctator avatar Jan 30 '24 21:01 cunctator