Thread: Z-Perl 2
View Single Post
04-16-16, 02:53 PM   #35
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Mostly i only done optimisations lately, but also added:

- Party pets
- Raid pets
- Player pet target

I currently experimenting a method instead of updating the unit target frames via OnUpdate:
Every time the unit changes target i run a scan which unit it could potentionally target: player/target/focus/party1-5/raid1-40 and, if i find a match with UnitIsUnit, then i register that unit and update the target frame based on that unit events rather then on every frame update. It seems to be working pretty good the difference is 0.25% CPU usage versus 0.01% per target frame. It's a pretty big difference in a 5 man party, where you have 5 target frames.

I also done some tweaks on the dev gui:
Instead of creating/anchoring/updating thousands of frames inside the scrollframe, i came up with a method to only draw the visible frames, and update them based on the scrollframe's offset, here the frame handles over 2200 frames and fontstrings updating in every second, and the usage is around 0.6%:

https://www.youtube.com/watch?v=NK_aenVIxAg

With this method i can also reanchor the columns in real time without any issues.

Last edited by Resike : 04-16-16 at 04:43 PM.
  Reply With Quote