WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Legion Beta archived threads (https://www.wowinterface.com/forums/forumdisplay.php?f=177)
-   -   frame:Show() and frame:Hide() is causing fps drops (https://www.wowinterface.com/forums/showthread.php?t=54017)

zork 07-25-16 10:40 AM

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?

lightspark 07-25-16 06:39 PM

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

zork 07-26-16 12:39 AM

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.

lightspark 07-26-16 02:13 AM

Quote:

Originally Posted by zork (Post 316987)
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.

Image quality matters the most. BPL format has disadvantages. BLPs often (always?) have artefacts, TGAs have better quality/size ratio.

And TBH, you can create quite lightweight TGAs, sometimes even lighter than BLPs.


Miiru 07-26-16 02:28 AM

Quote:

Originally Posted by lightspark (Post 316991)
Image quality matters the most. BPL format has disadvantages. BLPs often (always?) have artefacts, TGAs have better quality/size ratio.

.blp has no artifacts (judging by my experience) when the thexture has =< 256 colors and is saved in indexed compression :)

lightspark 07-26-16 02:45 AM

Quote:

Originally Posted by Miiru (Post 316992)
.blp has no artifacts (judging by my experience) when the thexture has =< 256 colors and is saved in indexed compression :)

Well, not my case then :p

And as you can see, I dun really suffer from using TGAs.

Resike 07-26-16 04:13 AM

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

lightspark 07-26-16 04:32 AM

Quote:

Originally Posted by Resike (Post 316998)
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?

We will never find out, unless someone asks them at engineering panel during BlizzCon :p

Quote:

Originally Posted by Resike (Post 316998)
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.

Yeah, but freezes are much worse on HDDs, and many people still use them.

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