View Single Post
08-27-08, 06:10 AM   #16
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
Originally Posted by kerrang View Post
What you're saying tho is that I've made my addon worse in performance terms??
Nope, not really.

It's not about how much memory is used. It's about when or where the memory is allocated.

There are basically no performance losses due to high memory usage only. But there WILL be performance losses due to the memory allocating process itself (creating new tables) and there will be a noticeable "lag" on every garbage collection. (depending on how much memory is allocated)

So you could use a lot of memory. But never allocate new memory (create tables) within OnUpdate. (Sounds as you already discovered that. *g*)

The way you're doing it is the only practical way. (re-using tables instead of creating new tables).

Last edited by Duugu : 08-27-08 at 06:17 AM.
  Reply With Quote