-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve readability of tables #1510
Conversation
@pavelbraginskiy do you get the same slowdown if you select "Print" but then print to file? This should produce a PostScript file (.ps) rather than a PDF, and may use a different code path for conversion. |
I hadn't thought to try it, I assumed it would be the same way. Exporting is actually super fast, printing takes forever. Still no idea why though... |
I copied one of your updated tables and (templates_us/tables_tank.svg) into 0.49.19.1 and didn't see any slowdown while exporting the file. You may have an issue in your new code rather than the .svg conversion itself. |
This may be related to how PDFs represent filled rectangles, and the printer drivers. I found several instances of people asking about this specific SVG use case and slowdowns. |
I wonder if it makes sense to rasterize the rectangles, then. Seems silly, but if it helps performance... |
It'd be good to get a sampling of other folks' print performance before doing much more work. I'll do a proper review after lunch, then see if we can just pull this. If it's broken for most testers we can consider more changes or fixes at that point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Recommend pulling and testing on as many different machines as possible to narrow down scope of printing/exporting slow-down.
Worst case, reverting just the .svg files will fix the issue.
To be clear, if the option is not enabled, and I believe it's off by default, there is no performance impact. |
So I tried rasterizing the shading. It does improve performance back to near-instant, but it make the rendering of the text under the shading look awful. It isn't a solution. |
I blame HP; I don't have any specific reason, I am just willing to blame them :) Let's see how the initial update works for folks, and then assess from there. |
Adds shading to every other row of many of the harder to read tables to make them easier to scan horizontally.
In order to not affect official record sheets, shading must be enabled from an option in the Configuration menu.
An example of the shaded tables:
![image](https://private-user-images.githubusercontent.com/29113974/332937304-2742562d-316e-451d-a300-f0f1c7a723bc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2Nzg5NTcsIm5iZiI6MTczOTY3ODY1NywicGF0aCI6Ii8yOTExMzk3NC8zMzI5MzczMDQtMjc0MjU2MmQtMzE2ZS00NTFkLWEzMDAtZjBmMWM3YTcyM2JjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE2VDA0MDQxN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE5MWRjZjQ3ZmI0OWRiNmIyNjk3ZWJjYzc3YTRjYjg0MDU3YWU4ZGMzNGZlY2FiNWMyN2Y5ODFlY2M2OWRiMzMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.tEynIWBnQMYCxekwqmRGwC53Yae_G3JdgD-laHn6NsM)
See here for an example of every covered unit type: testsheets.pdf
Problems
Enabling the option slows export/print of record sheets significantly, from 1-2 seconds to around half a minute per sheet. Since this doesn't affect users not using the option, which is the default, I don't think this is a blocker. I have no idea why this happens, and could use some insight.
The additional tables from Print reference tables and the fluff-image-replacement tables aren't shaded, and it would be nice if they were. These tables aren't in SVGs and would need a different, programmatic approach in order to be shaded.