ID:2935016
 
Resolved
text2path() info for all prototypes (but not currently for procs) is now pre-cached on world start. This avoids an O(n) lookup when text2path() is first used for a type string that hasn't been cached yet.
Applies to:Dream Daemon
Status: Resolved (515.1641)

This issue has been resolved.
Currently, Byond_New takes a really long time if you pass string arguments. It would be nice if this could be sped up for known paths.

Quote from Lummox:

Lummox JR — Today at 09:32
new() calls the same function internally.
The internal text2path() caches all string-to-path lookups, so it really ahould be quite fast after the initial lookup.
That said, I might be able to goose that with a quick fill of the lookup structure on server start, since all ProtoObjs already know their type string.
I suspect what you're seeing is entirely from cache misses.
I'd also love if we had a ByondAPI proc like "Byond_Text2Path" that allows executing it without calling into a soft code proc.
Lummox JR resolved issue with message:
text2path() info for all prototypes (but not currently for procs) is now pre-cached on world start. This avoids an O(n) lookup when text2path() is first used for a type string that hasn't been cached yet.

Login to reply.