You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given that GetTime() reaches out all the way to the underlying OS it kinda makes sense to snapshot and reuse the timestamps it generates when possible. An example of before-after:
Before:
visibilityscan:SetScript("OnUpdate", function()
if (this.limitor1) >GetTime() thenreturnendthis.limit=GetTime() +.2
[...]
After:
visibilityscan:SetScript("OnUpdate", function()
localnow=GetTime()
if (this.limitor1) >nowthenreturnendthis.limit=now+.2
[...]
The text was updated successfully, but these errors were encountered:
dsidirop
changed the title
Optimize functions that use GetTime() multiple times by calling GetTime() just once (when possible to do so)
Optimize functions that use GetTime() multiple times by calling GetTime() just once (when possible/meaningful to do so)
Jun 2, 2024
Given that GetTime() reaches out all the way to the underlying OS it kinda makes sense to snapshot and reuse the timestamps it generates when possible. An example of before-after:
Before:
After:
The text was updated successfully, but these errors were encountered: