Universal variables re-narrow path again and again and again #5905
Labels
performance
Purely performance-related enhancement without any changes in black box output
Milestone
In something like
about 20% of the total time is taken up in wcs2string, much of that coming from universal_barrier() (which is triggered here because it's an external command - this does not happen with
builtin true
).And that does wcs2string because it is narrowing the uvar path, again and again and again, even though it stays the same 99.999% of the time.
I propose we cache the narrow versions of these kinds of paths - we still need the wide version for output. Unfortunately this means changing from our nice and friendly "waccess" et al wrappers, because they do the narrowing for you.
The text was updated successfully, but these errors were encountered: