Thread Tools Display Modes
07-25-16, 10:40 AM   #1
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
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?
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
 
07-25-16, 06:39 PM   #2
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
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
__________________

Last edited by lightspark : 07-25-16 at 10:11 PM.
 
07-26-16, 12:39 AM   #3
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
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.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 07-26-16 at 12:41 AM.
 
07-26-16, 02:13 AM   #4
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
Originally Posted by zork View Post
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.

__________________
 
07-26-16, 02:28 AM   #5
Miiru
A Flamescale Wyrmkin
 
Miiru's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 138
Originally Posted by lightspark View Post
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
__________________
◘◘ Author of MiirGui Texture Pack - [Core] [Blue] [Grey] ◘◘
 
07-26-16, 02:45 AM   #6
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
Originally Posted by Miiru View Post
.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

And as you can see, I dun really suffer from using TGAs.
__________________
 
07-26-16, 04:13 AM   #7
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
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

Last edited by Resike : 07-26-16 at 04:21 AM.
 
07-26-16, 04:32 AM   #8
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
Originally Posted by Resike View Post
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

Originally Posted by Resike View Post
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
__________________
 
 

WoWInterface » Site Forums » Archived Beta Forums » Legion Beta archived threads » frame:Show() and frame:Hide() is causing fps drops

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off