slint
slint copied to clipboard
Reduce allocations of scene items in the sw renderer
Allocate capacity for scene item vector with the number of items from the last scene.
That shaves off about 1-2ms of pre-scene time on the pico and stm32.
I'm not entirely sure that this is worth the complexity. Or perhaps there's a much simpler way?
Why not keep the state in the LineRenderer itself? (yeah, this will be useless when using the rendering by buffer, but it's not so much data)
Also this is only for one of the vector, but there is a bunch of vector where we append items, in particular the texture vector should have about the same size. so this may be another ~2ms if we do it for the other vectors.
Sure, good idea - I don't mind keeping it there then. That's certainly less intrusive!
Why not keep the state in the LineRenderer itself? (yeah, this will be useless when using the rendering by buffer, but it's not so much data)
Also this is only for one of the vector, but there is a bunch of vector where we append items, in particular the texture vector should have about the same size. so this may be another ~2ms if we do it for the other vectors.
Done. This is less intrusive now.
How is the speed with that path now? Does it improve perfs on the pico?
How is the speed with that path now? Does it improve perfs on the pico?
My pico is in the office :(. I can check next week.
Deferring this for now as I'm not working on this at the moment.