Github user srowen commented on the issue:
https://github.com/apache/spark/pull/21456
Hm, I guess I was supposing that, in the context of a file stream, whatever
I/O is done with it is going to be much more significant than string
manipulation of its path. Would this really be called, say, a million times in
a short period? I ran a quick benchmark to sense-check and looks like those
million replacements take all of a second of CPU time. (This is with a
precompiled Pattern) It's minor here, but that's nontrivial extra code to get
right and read and maintain, if that's all it's doing. Yes if it were an
extreme hotspot it could be called for.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]