@@ -53,6 +53,7 @@ function mt:getSets(suri)
5353 if self .setsCache [cacheUri ] then
5454 return self .setsCache [cacheUri ]
5555 end
56+ local clock = os.clock ()
5657 self .setsCache [cacheUri ] = {}
5758 local cache = self .setsCache [cacheUri ]
5859 for uri , link in pairs (self .links ) do
@@ -64,6 +65,10 @@ function mt:getSets(suri)
6465 end
6566 end
6667 end
68+ local cost = os.clock () - clock
69+ if cost > 0.1 then
70+ log .warn (' global-manager getSets costs' , cost , self .name )
71+ end
6772 return cache
6873end
6974
@@ -77,6 +82,7 @@ function mt:getGets(suri)
7782 if self .getsCache [cacheUri ] then
7883 return self .getsCache [cacheUri ]
7984 end
85+ local clock = os.clock ()
8086 self .getsCache [cacheUri ] = {}
8187 local cache = self .getsCache [cacheUri ]
8288 for uri , link in pairs (self .links ) do
@@ -88,6 +94,10 @@ function mt:getGets(suri)
8894 end
8995 end
9096 end
97+ local cost = os.clock () - clock
98+ if cost > 0.1 then
99+ log .warn (' global-manager getGets costs' , cost , self .name )
100+ end
91101 return cache
92102end
93103
@@ -431,7 +441,7 @@ function vm.getGlobalFields(cate, name)
431441 end
432442 local cost = os.clock () - clock
433443 if cost > 0.1 then
434- log .warn (' global-manager getFields cost %.3f ' , cost )
444+ log .warn (' global-manager getFields costs ' , cost )
435445 end
436446
437447 return globals
@@ -451,7 +461,7 @@ function vm.getGlobals(cate)
451461 end
452462 local cost = os.clock () - clock
453463 if cost > 0.1 then
454- log .warn (' global-manager getGlobals cost %.3f ' , cost )
464+ log .warn (' global-manager getGlobals costs ' , cost )
455465 end
456466
457467 return globals
0 commit comments