FAILED ATTEMP TO MULTITHREADING: Speedup using threading prerender
FAILED MR, RENDERING NO FILTERED ELEMENTS IN SEPARARE IS NO TIME COSUPTION TO GET GOOD RESULTS SO it PRECACHE CORRECTLY BUT NO SPEEDUP, REALY SLOWER
Whath
This MR a new function to drawing items that allow pre-render it using threads based on the number of renderable items. Because this threads can be reusable, we avoid the issue on fast operactions about slownest on open/close threads.
If we have the item prerendered in chache, this show instan with minimun main processing time.
Research
Multithreading is based on:
https://lemire.me/blog/2020/06/10/reusing-a-thread-in-c-for-better-performance/
https://github.com/lemire/Code-used-on-Daniel-Lemire-s-blog/tree/master/2020/06/10
Numbers
Testfile:
At the end of this description (island with some filters)
Machine 1
- Processor: Intel® Core™ i5-8400 CPU @ 2.80GHz × 6
- Graphichs: Mesa Intel® UHD Graphics 630 (CFL GT2)
- Screen: 1920*1080 no hidpi
- OS: Linux debian testing
- Clean preferences except number threads and toggle thread prerender
- Rendering: 512 MB cache, 16 tiles (default)
- Measure in seconds
- Closed panels
Jobs Machine 1
| action | normal | 4 threads | 6 threads | 4 threads | 2 threads |
|---|---|---|---|---|---|
| open inkspape | 0.578 | 0.577 | |||
| F12 | 0.012 | 0.014 | |||
| open test file | 0.407 | 0.554 | |||
| 4 | 0.205 | ||||
| 5 | 0.302 | ||||
| + | 0.404 | ||||
| + | 0.42 | ||||
| + | 0.464 | ||||
| wheel up 1 pos | 0.038 | ||||
| wheel up 1 pos | 0.036 | ||||
| wheel down 1 pos | 0.004 | ||||
| - | 0.451 | ||||
| 5 | 0.377 |
Edited by Jabier Arraiza