frame:Show() and frame:Hide() is causing fps drops
I think the following is related to the texture memory issues, but I'm not sure.
On my compass castbar addon I experienced fps drops. I changed the latency texture from Show/Hide to SetAlpha already. But Show/Hide on the castbar still causes fps drops. If I comment out frame:Show() and frame:Hide() there is no fps drop at all. I tried reparenting to a hidden frame and reparenting to UIParent when shown. Same fps drop. Using SetAlpha on the frame works for me. No fps drops any more. Still super wierd. https://github.com/zorker/rothui/com...840ed79c4e9cdf How do you handle these fps drops? |
Right now every single time you show a texture it's read from your drive.
I tried to optimise my textures as much as I could, instead of grouping all related textures into atlases, I split them into individual files to make files as small as possible. For example, I used to have a massive fps drop, when many buttons were shown on the screen at once. Button's border, highlight and pushed textures used to be one atlas, 16KB in size. My button border is a set of 8 textures, so when the game had to render 60+ buttons * 8 textures * 16KB each at once, it had to read ~7.5MB from my drive, that's way too much. I split my atlas into individual textures, but I went even further and also split button border into 8 individual textures, each has a size of ~280 bytes!!!, so now, when I open a spell book, and all buttons are shown, I get no fps drop at all. You use really big and heavy textures, each is 1MB, ofc when game loads them, you'll get a freeze. -- update #1 I tweaked your TGAs a bit, cuz 1MB is just wrong for such simple textures. I managed to slim them down to this state. But they're still 512x512 textures, you'll be able to improve their sizes even more by resizing them to 256 x 256, I dun think that 512 x 512 is really that needed. -- update #2 256s. -- update #3 I downloaded your addon, reverted SetAlpha to Show/Hide and used my 256 x 256 TGAs, I dun get any fps drop at all. Here's an archive w/ textures. https://www.dropbox.com/s/gny8knthicga5y4/TGA.zip?dl=0 |
Thanks. Sorry my bad. I forgot to convert to blp. If file size really matters blp is what you want.
For now SetAlpha works just fine for me. |
Quote:
And TBH, you can create quite lightweight TGAs, sometimes even lighter than BLPs. |
Quote:
|
Quote:
And as you can see, I dun really suffer from using TGAs. |
This is kinda dumb. Are we really gonna need to reparent textures to the UIP and SetAlpha them now just because of this new dumb change. Why can't they just get textures off from the game engine just like the icons?
And I don't really get how is reading a 1-2 MB sized texture from a high-performace SSD, could really cause such big lagspikes. So I'm pretty sure there is more behind this. I personally hate blps, hard to work with shit quality and nothing supports it. Also some programs dosn't really like RLE compressed TGAs, so thats also a deadend |
Quote:
Quote:
Anyway, it's a good opportunity to think about performance, texture optimisation, etc :D |
All times are GMT -6. The time now is 07:32 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI