Download
(939 b)
Download
Updated: 07-23-08 09:51 AM
Pictures
File Info
Updated:07-23-08 09:51 AM
Created:unknown
Downloads:1,550
Favorites:4
MD5:

Fix ScrollingMessageFrame Lag

Version: 1.0
by: Drundia [More]

This light-weight addon fixes massive lag when massive number of messages are added to Scrolling Message Frames. It covers all of them automatically (most common ones being Chat Frames).

Extremely helpful in AOE-heavy raiding situations like Hyjal trash.

Optional Files (0)


Post A Reply Comment Options
Unread 07-29-08, 03:11 PM  
Drundia
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 3
Uploads: 2
My tests show that :UpdateColorByID() doesn't force update after :SetHeight().

You are correct, all 3 functions used to fix lag will result in addon action blocked message if the frame is protected. Also I missed interruption of dragging that it causes, and I agree about possible evil OnShow and OnHide scripts. I'll look into it all.

However it may end up causing more harm than help if all issues are accounted for and fixed.
Last edited by Drundia : 07-29-08 at 03:25 PM.
Report comment to moderator  
Reply With Quote
Unread 07-28-08, 10:16 PM  
Saiket
A Chromatic Dragonspawn
 
Saiket's Avatar
AddOn Author - Click to view AddOns

Forum posts: 154
File comments: 330
Uploads: 9
While putting together my implementation (in my _Dev addon), I noticed a potential problem: Since the message frame is hidden and shown when printed to, it can break dragging with chat frames, and also has the potential to cause "addon blocked" messages and also fire time-consuming OnHide and OnShow scripts.

A compromise I found was to use the following API in your OnUpdate script to refresh the text display instead:
Code:
if ( MessageFrame:IsVisible() ) then
    local Color = ChatTypeInfo[ "SYSTEM" ]; -- Chosen only because it has ID 0
    MessageFrame:UpdateColorByID( Color.id, Color.r, Color.g, Color.b ); -- Redraws text
end
Just change that MessageFrame variable to the one you actually used, and it should work in combat and won't make dragged frames stop dragging.
Report comment to moderator  
Reply With Quote
Unread 07-25-08, 07:17 PM  
Drundia
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 3
Uploads: 2
Re: Great find!

Originally posted by Saiket
How did you stumble across this trick? I can recursively print out the entire global environment in six seconds now, where before this addon I would have been disconnected before the command finished!

Do you mind sharing the theory behind why this works? Also, do you mind me using the concept in one of my more text-heavy mods?
From what I know other text displaying widgets don't have similar performance issues.

The frames just don't lag when they are hidden or immediately after :SetWidth() or :SetHeight(), I have no idea why it works, but it works. You are welcome to use this addon and/or its parts/ideas in your work with proper attribution.
Report comment to moderator  
Reply With Quote
Unread 07-24-08, 03:08 AM  
Saiket
A Chromatic Dragonspawn
 
Saiket's Avatar
AddOn Author - Click to view AddOns

Forum posts: 154
File comments: 330
Uploads: 9
Great find!

How did you stumble across this trick? I can recursively print out the entire global environment in six seconds now, where before this addon I would have been disconnected before the command finished!

Do you mind sharing the theory behind why this works? Also, do you mind me using the concept in one of my more text-heavy mods?
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: