Repository navigation
Pre-fetch object_meta to avoid simultaneous access on first search - #125
Conversation
| this.names = d; | ||
| })); | ||
| await Promise.all(fileLoadPromises); | ||
| // Pre-fetch object_meta.json (the first search causes simultaneous access) |
There was a problem hiding this comment.
can't we just add object_meta.json to fileList?
and actually do you know why AreaData/ClimateData/ObjectMeta are even in this file? doesn't seem related to messages at all
There was a problem hiding this comment.
Adding those to the fileList (/public/game_files/text/list.json) is probably best, but list.json lives outside of the repo. They could be hard-coded in like names.json.
Then, we would need to modify getObjectMetaData() and friends to request the files content with getFile(). This is fine with me.
I think those are all changes I made. I think that it they closer in content than MapMgr, which is more database rather than "static" or data from a file.
There was a problem hiding this comment.
I think I am all set with the PR. Would be glad to merge this.
On the first search after loading the map,
object_meta.jsonwas requested simultaneously as the check for the existing data was insufficient to avoid repeated network requests.This change is