View Single Post
07-25-11, 02:42 PM   #1
Pixol
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 13
Concatenation in a For Loop

My add-on currently has a high cpu usage
(according to Addon Profiler add-on)
I have commented out the majority of the script and found out this is the cause for major CPU usage, ~2CPU/sec. It's not as high as pitbull using like 20 but it's high for a simple task.

Code:
      for i=1,8 do
        for j=1,5 do
          x="CompactRaidGroup"..i.."Member"..j
        end
      end
Is there another other option than writing conditionals like below 40 times?
if i==1 and j==1
then x=CompactRaidGroup1Member1

Or is concatenation supposed to be a fairly high CPU usage task?
  Reply With Quote