Hello,
I'd like to know if there are considerably performance hit using many layers even if they are hidden, I'm asking this because I would like to create all what I need in my app at the beginning to have a more smooth experience at run time, I don't know how layers are handled internally, maybe hidden layers are just ignored...
Question about layers
Question about layers
----------------------------
[Allanon] Fabio Falcucci | GitHub (leaving) | Gitea (my new house) | My Patreon page | ☆★ All my links ★☆
[Allanon] Fabio Falcucci | GitHub (leaving) | Gitea (my new house) | My Patreon page | ☆★ All my links ★☆
Re: Question about layers
You're probably better off pre-loading brushes rather than creating a bunch of hidden layers. If you keep all your brushes organized (such as by using #LIGHTUSERDATA IDs), then just display the brushes as needed either as seperate layers or by changing the brushes that are assigned to the layers using SetLayerStyle() with {ID=}. I would guess that this would give better performance than having a lot of hidden layers.
Re: Question about layers
Yes, I'm currently preloading brushes but since my layers are quiet complex because of more than one brushes are blitted into them the way you suggest could be more slow because of the blitting operations... I should make some benchmarks to see what's the best approach or if some of you have already done these tests could be better 
----------------------------
[Allanon] Fabio Falcucci | GitHub (leaving) | Gitea (my new house) | My Patreon page | ☆★ All my links ★☆
[Allanon] Fabio Falcucci | GitHub (leaving) | Gitea (my new house) | My Patreon page | ☆★ All my links ★☆
- airsoftsoftwair
- Posts: 5887
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: Question about layers
Yes, hidden layers are just ignored so it shouldn't affect performance too much (unless there are thousands of hidden layers maybe).
Re: Question about layers
thank you for the confirm, there are not thousands but hundreds 
----------------------------
[Allanon] Fabio Falcucci | GitHub (leaving) | Gitea (my new house) | My Patreon page | ☆★ All my links ★☆
[Allanon] Fabio Falcucci | GitHub (leaving) | Gitea (my new house) | My Patreon page | ☆★ All my links ★☆