Skip to content

[Bug] ExcelRowWrapper [] getter has poor performance #68

Description

@ShamelessEnd

originally raised in #64 with a workaround added

Describe the bug
When calling Excel.<Sheet>:GetRow(<row>).<prop> or Excel.<Sheet>:GetRow(<row>)["<prop>"] in lua performance is very slow.

Listing the getter with an explicit GetProperty name and calling Excel.<Sheet>:GetRow(i):GetProperty("<prop>") appears to resolve the issue (completes in <0.1s).

Macro to reproduce problem

local sheet = Excel.Item
local startTime = os.clock()
for i = 0, 49000 do
  local name = sheet:GetRow(i).Name
end
local endTime = os.clock()
yield("/e "..(endTime - startTime))

this takes (me) about ~15s to complete, and the entire game locks up for that whole duration (windows will even prompt to terminate the unresponsive game after a bit)

/xllog output
N/A other than the long HITCH warning:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions