View Single Post
10-04-10, 11:41 PM   #25
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Originally Posted by neverg View Post
I use frequentupdates set to 0.1 on live for my Raid Frames Health, because health update lag is really bad with a bit of lag on top. That is why I used quickhealth with Grid (prior to oUF) and I really noticed the difference.

Do you think the performance hit is big when using frequent updates like that on all raid units just on health?
I'm not sure if you are thinking of tags now, or the actual health element. Both support frequentUpdates, but they work slightly different.

On the tags you are able to do frequentUpdates = .1, which pretty much means "call my tag function ten times a second". You'll probably not notice too much of an difference with this, but it depends on quite a lot of factors.

On the health element you only have the option of having it on or off. When it's enabled oUF compares the previous value with the current, and if it's different it triggers the update function. The update loop that does this isn't throttled and checks for updates every (1/fps) second.

Tags aren't that bad however, they are about 40-60% slower than hand-writing the update function. They do generally use more memory however. The reason it's throttled differently is mainly because we don't have any other option.

Originally Posted by Dawn View Post
I have an issue with portraits. On live, I'm setting an alpha and force it to update and set the camera position (0). Otherwise alpha and camera setting will "bug out". Aka alpha resets to 1 and stays @1. Camera resets to full body view (2, afaik).

Anyway, I fixed this with the following function (on live).
Code:
local Portrait_PostUpdate = function(Portrait, unit)
	if (not UnitExists(unit) or not UnitIsConnected(unit) or not UnitIsVisible(unit)) then
		Portrait:Hide()
	else
		Portrait:Show()
		Portrait:SetCamera(0)
		Portrait:SetAlpha(cfg.pAlpha)
	end
end
Code:
self.Portrait.PostUpdate = Portrait_PostUpdate
This works ace on live, but beta once again ****s it up.

I tried to set an alpha without using the function. Doesn't work at all
I tried to self.Portrait.Override = Portrait_PostUpdate. Which hides the frames that have a portrait, no lua error.
.Override is an event function. It's called as: func(self, event, ...).

Originally Posted by Dawn View Post
Some things to note:
Directly setting an alpha without the update function doesn't work, but it works with it - for player (model never changes, alpha stays the same) and initially also for the target, but no longer after the first switch. Which inditactes to me that it's called at least once, but not updated.

Long story short, what am I doing wrong?
It means that the model widget has changed again, but I don't know to what extent. I have to take a look at it myself, which I don't think I'll be able to do today.

Originally Posted by Dawn View Post
Btw, I want to suggest for 1.5 to hide non existent portraits, instead of showing the question mark.
Or just leave it as it is :P
__________________
「貴方は1人じゃないよ」
  Reply With Quote