diff options
Diffstat (limited to 'script/vm/local-id.lua')
-rw-r--r-- | script/vm/local-id.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/script/vm/local-id.lua b/script/vm/local-id.lua index cda49d23..aa4f3118 100644 --- a/script/vm/local-id.lua +++ b/script/vm/local-id.lua @@ -177,6 +177,7 @@ function m.getFields(source) return nil end -- TODOļ¼optimize + local clock = os.clock() local fields = {} for lid, sources in pairs(root._localIDs) do if lid ~= id @@ -189,6 +190,10 @@ function m.getFields(source) end end end + local cost = os.clock() - clock + if cost > 1.0 then + log.warn('local-id getFields takes %.3f seconds', cost) + end return fields end |