Thread Tools Display Modes
11-30-09, 01:32 PM   #1
leizeQ
A Murloc Raider
 
leizeQ's Avatar
AddOn Compiler - Click to view compilations
Join Date: Jun 2008
Posts: 8
tags vs the other method

hi haste.

i have a short question (or two i couldn't find any answer to.
what is the advantage of tags ?
are they using more cpu/memory ?

thanks a lot
  Reply With Quote
11-30-09, 01:48 PM   #2
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
1. The main difference is really that it is easier to rearrange and try things out. It allows you to move things around without too much effort.

2. This is pretty arbitrary to answer. Tags can be more efficient both memory and CPU vice, but the general rule is that they use around 30% more CPU than a hand-tailored Lua function doing exactly the same as the tag string. This is kinda the wrong way to look at it tho'. The tags have their own separate update system (from the rest of the layout) and they are shared on a global base through oUF, unlike the frames which all have their very own private update dispatcher.

Tags are also slightly more powerful in the way that you can tweak forced OnUpdate timers, which means that you can have the HP updated every OnUpdate, while the general information is only updated when the events fire.

With all that said it boils down to ease of use vs performance really.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
11-30-09, 01:56 PM   #3
wurmfood
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Apr 2009
Posts: 122
For what it's worth, it took a little effort for me to switch my layout over to tags, but once I did I found it much easier to change what information is displayed and how. Also, because the tags are modular, it's actually easier to "borrow" from someone else's code to create something for yourself.
  Reply With Quote
11-30-09, 02:00 PM   #4
leizeQ
A Murloc Raider
 
leizeQ's Avatar
AddOn Compiler - Click to view compilations
Join Date: Jun 2008
Posts: 8
thank you very much for the quick answer. i am trying to create a layout and am worried that if i use many tags (lets say 100) that it will be too cpu intensive. that would pretty much defeat the oUF purpose to be cpu/mem effective.

as my understanding of using oUF is intermediate i'm not sure i could create that hand-tailored function so i can assume that tags will make good start point for me (;

again thanks
  Reply With Quote
11-30-09, 03:50 PM   #5
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
You most likely won't be able to use to many tags, anyway. At least it's generally not a good idea to have so much "information" shown. The more you show the higher chances are you are showing unnecessary information. Tags are a really good thing, imho.
__________________
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
11-30-09, 07:38 PM   #6
Tekkub
A Molten Giant
 
Tekkub's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 960
Yea using 100 tags is just insane. Whittle that down into a few tags that give you the info you need (my guess is that you're trying to monitor hundreds of auras?)
__________________
I have reached enlightment.
Thank you bacon!
  Reply With Quote
12-01-09, 01:37 AM   #7
leizeQ
A Murloc Raider
 
leizeQ's Avatar
AddOn Compiler - Click to view compilations
Join Date: Jun 2008
Posts: 8
hm, maybe 100 was a little bit much.

lets count:
player - hp, pp
target - hp, pp, name, level
tot - hp, name
focus - hp, name
pet - hp, pp
raid - 40x name (at most)

that's 52 tags; any unnecessary ?
maybe i just didn't get the right meaning of tags and i'm using them wrong.

my guess is that you're trying to monitor hundreds of auras?
for auras i use the aura.lua element or another addon. i have to study the tag system a little more to get what are all the possibilities

edit: hm, i was thinking about it; isn't this only 4 tags?

Last edited by leizeQ : 12-01-09 at 01:41 AM.
  Reply With Quote
12-01-09, 01:50 AM   #8
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
Originally Posted by leizeQ View Post
hm, maybe 100 was a little bit much.

lets count:
player - hp, pp
target - hp, pp, name, level
tot - hp, name
focus - hp, name
pet - hp, pp
raid - 40x name (at most)

that's 52 tags; any unnecessary ?
maybe i just didn't get the right meaning of tags and i'm using them wrong.


for auras i use the aura.lua element or another addon. i have to study the tag system a little more to get what are all the possibilities

edit: hm, i was thinking about it; isn't this only 4 tags?
It would only be 4 tags yes. I don't really have any tags in my layout but was thinking of changing it over >.>
  Reply With Quote
12-01-09, 03:45 AM   #9
Tekkub
A Molten Giant
 
Tekkub's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 960
That's exactly how they're intended to be used. You made it sound like you wanted 100 tags in one string, which would just be stupid. Those tags are going to update just as often as they will in any other UF, they *have* to.
__________________
I have reached enlightment.
Thank you bacon!
  Reply With Quote
02-08-10, 10:05 AM   #10
leizeQ
A Murloc Raider
 
leizeQ's Avatar
AddOn Compiler - Click to view compilations
Join Date: Jun 2008
Posts: 8
hello again.

could someone pls paste an example how to make a tag change the fontstring (color, alpha, ...) based on a condition?

(explanation: i want to have my HP change color based on how much HP is left; 100% - green, 50% - yellow, 25% - red

i can do the math, but dont know where to put it to trigger the update)

thx
  Reply With Quote
02-08-10, 10:57 AM   #11
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Take a look at how haste did it in oUF VerticalEntity
http://github.com/haste/oUF_Vertical...l.lua#L115-120
  Reply With Quote
02-09-10, 01:35 AM   #12
leizeQ
A Murloc Raider
 
leizeQ's Avatar
AddOn Compiler - Click to view compilations
Join Date: Jun 2008
Posts: 8
Originally Posted by p3lim View Post
Take a look at how haste did it in oUF VerticalEntity
http://github.com/haste/oUF_Vertical...l.lua#L115-120
thanks a lot. i assume line 125 is also needed (;
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » tags vs the other method


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