View Single Post
08-02-12, 09:37 PM   #5
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Originally Posted by Phanx View Post
<snip>
(3) Instead of formatting text yourself with string.format and then passing the result to :SetText, you should pass all of the arguments directly to :SetFormattedText, which does the same thing but offloads the work into C code, which is (presumably) faster.
Actually, the biggest reason to use this is that it goes straight to the C-side, thereby bypassing the creation of a Lua string. Since Lua strings are immutable, this can considerably reduce memory usage.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.