Thread Tools Display Modes
07-11-10, 06:57 AM   #1
lerb
A Frostmaul Preserver
 
lerb's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 264
Energy text update

Hey!

Having a problem with my unitframes. Playing a rogue, and my powerbar updates well, but my energy TEXT updates in per 20 energy ticks. Currently using oUF_Lily.

How do i fix this?
  Reply With Quote
07-11-10, 07:59 AM   #2
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
In oUF_Lily the power bar is set with frequent updates, so it will update very often.

The power text tag is set to update only when certain events are received, hence the large jump in values it shows.


When the fontstring to hold the power text tag is created you can also apply frequentupdate settings:

Code:
	local PowerPoints = Power:CreateFontString(nil, "OVERLAY")
	PowerPoints:SetPoint("RIGHT", HealthPoints, "LEFT", 0, 0)
	PowerPoints:SetFontObject(GameFontNormalSmall)
	PowerPoints:SetTextColor(1, 1, 1)
	PowerPoints.frequentUpdates = true
	self:Tag(PowerPoints, '[lily:power< | ]')
As the updates will occur more often, then the cpu usage will also go up.
  Reply With Quote
07-11-10, 09:09 AM   #3
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
You can also use an update value instead of true, which defaults to .5.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
07-11-10, 11:38 AM   #4
Waverian
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 188
If you want to mimic the default value for accurate energy updates use .1
  Reply With Quote
07-13-10, 03:01 AM   #5
lerb
A Frostmaul Preserver
 
lerb's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 264
Thanks alot guys, youre awesome
  Reply With Quote
07-15-10, 06:36 AM   #6
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Good to know that.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
08-03-10, 10:01 PM   #7
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
I know this thread is a tad old, bit its awesome to know, now my tags are updating very well. Thanks

edit -

When I do put that tag:

self.name.frequentUpdates = .1

It updates faster, but it doesn't seem to still update as fast as say... Grid or VuhDo showing buffs, anyway to replicate the tags showing as fast as they are applied or happening?

Last edited by Ferous : 08-03-10 at 10:13 PM.
  Reply With Quote
08-03-10, 10:21 PM   #8
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
You could still decrease the number (which in turn increases cpu cycles used). The question is, if it's worth it. Or how accurate does it have to be without cutting to much performance.
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."

  Reply With Quote
08-03-10, 10:40 PM   #9
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
Originally Posted by Dawn View Post
You could still decrease the number (which in turn increases cpu cycles used). The question is, if it's worth it. Or how accurate does it have to be without cutting to much performance.
oUF doesn't use nearly as much memory as say VuhDO and PitBull together, so it wouldn't matter for me... but you're right, considering I'd like to have others maybe use it, they may not like it :P
  Reply With Quote
08-03-10, 11:51 PM   #10
Freebaser
A Molten Kobold Bandit
 
Freebaser's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 135
Originally Posted by Ferous View Post
oUF doesn't use nearly as much memory as say VuhDO and PitBull together, so it wouldn't matter for me... but you're right, considering I'd like to have others maybe use it, they may not like it :P
This really has nothing to do with memory. Changing the value could make a big difference when your running an OnUpdate on 40 frames. It use to lag me quite a bit in AV, but this was before the 1.4 tag fix. I haven't tested it lately though.
  Reply With Quote
08-04-10, 12:01 AM   #11
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
Originally Posted by Freebaser View Post
This really has nothing to do with memory. Changing the value could make a big difference when your running an OnUpdate on 40 frames. It use to lag me quite a bit in AV, but this was before the 1.4 tag fix. I haven't tested it lately though.
I'll check it out. Having it at .1 and no lag. I'll try out lower and see how my lag goes.
  Reply With Quote
08-04-10, 09:07 AM   #12
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
I tried it all day doing batlegrounds, and i set it to .05, no lag, no nothing, everything was fine and it updates as fast as any other thing i.e. vuhdo so if you were lagging previously to the lag fix, it must have made it better.
  Reply With Quote
08-04-10, 09:57 AM   #13
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
Like Freebaser said, it's not about memory it's about consuming CPU cycles. It can hurt slower PCs, but even cause lag on fast ones if you use it on an element that is spread over several frames.

You can test the performance with AddonManager - enable the CPU option, reload, try different values and take a look at how many CPU cycles are used. Basically half the time takes twice as much cycles (rough said).

That's why I said
The question is, if it's worth it. Or how accurate does it have to be without cutting to much performance.
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."

  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Energy text update

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