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
"delayloaded" functions are accessed via a lookup function stored at "lib/tools/delayLookup.lua".
Unfortunately the result is only stored in an internal cache but not in the library table.
That means the lookup function is called whenever the delayloaded function is accessed.
And since the lookup function is weakly stored it has to be reloaded every few calls.
That causes a lot of HDD accesses.
Examples
This shows the result is not stored in the library table:
local term = require("term")
local event = require("event")
while true do
local e, s = event.pull(0.1)
if s == term.screen().address then
print("...")
end
end
Since I didn't write the delayed loading stuff I'm not sure how to progress here. I could go ahead and modify lib/tools/delayLookup.lua to write to the library table. But I'd like to get someone else's opinion before I create a pull request.
The text was updated successfully, but these errors were encountered:
I either want to keep it in the library table (e.g. term) or make the delay loader not weak. There are trade offs. I'll test some workflows, fix it, and tag this issue. Thanks for reporting.
"delayloaded" functions are accessed via a lookup function stored at "lib/tools/delayLookup.lua".
Unfortunately the result is only stored in an internal cache but not in the library table.
That means the lookup function is called whenever the delayloaded function is accessed.
And since the lookup function is weakly stored it has to be reloaded every few calls.
That causes a lot of HDD accesses.
Examples
This shows the result is not stored in the library table:
This causes a lot of HDD interaction:
Since I didn't write the delayed loading stuff I'm not sure how to progress here. I could go ahead and modify lib/tools/delayLookup.lua to write to the library table. But I'd like to get someone else's opinion before I create a pull request.
The text was updated successfully, but these errors were encountered: