| Ticket UUID: | aa802cdecff0578780672841b374bf988f46e31b | |||
| Title: | Copying/drawing on images with many transparent spaces is very slow | |||
| Type: | Bug | Version: | 8.6 | |
| Submitter: | dusthillresident | Created on: | 2024-06-20 17:05:43 | |
| Subsystem: | 41. Photo Images | Assigned To: | fvogel | |
| Priority: | 5 Medium | Severity: | Important | |
| Status: | Closed | Last Modified: | 2024-06-20 21:33:20 | |
| Resolution: | Duplicate | Closed By: | dusthillresident | |
| Closed on: | 2024-06-20 21:33:20 | |||
| Description: |
Copying 'photo' images with many transparent spaces in them is very slow. Drawing (with 'imageName put') into 'photo' images that contain lots of transparent spaces is also slow. In some cases, on a Ryzen 5 3600 computer, it can take over 8 seconds to copy a 640x480 image that contains a lot of transparent spaces. This unfortunately severely damages the usefulness of the 'photo' images for certain applications (like for example, a Paint/drawing app) Here is a little demonstration Tcl script. It puts randomly positioned blue pixels in a 640x480 image, in batches of 1600 at at time, and displays the time taken to draw one batch of pixels. There is a button labelled "benchmark copy" that you can use to see how long it takes to copy the current state of the displayed image into a blank image.
| |||
| User Comments: |
dusthillresident added on 2024-06-20 21:33:20:
Hi fvogel, thank you for the reply. Re:seeing the problem on other platforms, I've tested this on Linux and MacOS and both are affected. - dhr fvogel added on 2024-06-20 20:51:06: Thanks for the report. I can reproduce on Windows (do you see the problem on other platforms as well?) Profiling shows that 99.9% of the time is spent on this line in the generic code. The comment a bit upwards in the code is interesting and shows that performance here has already been analyzed, with an implementation choice consciously made. For Windows, one level deeper, 99.9% of the time is spent on that line calling a GDI function conbining regions in TkpBuildRegionFromAlphaData(). All in all, this is (yet another) duplicate of [919066]. Christopher Chavez has proposed an approach in that ticket to fix it. | |||
Home
Timeline
Branches
Tags
Forum
Tickets
Download
Wiki