Closed hoelzro closed 7 years ago
Are there any performance hits for expanding our shebang detection?
There should'nt be, but we should probably run the time regression thing after we add more languages. The first line of each resource should be cached. Running a bunch of regexes one after the other might hurt a bit, but we might be able to combine them into a super regex. How we extract which sub-regex matched could get interesting...
Let's do the performance test before we start thinking how we could optimize it.
Isn't there already shebang detection for a lot of filetypes? ConfigDefault gives firstlinematch
patterns for Perl, PHP, Python, Ruby, shell (of several varieties), and XML. This seems like most of the languages (that I can think of offhand, anyway) that use shebang lines anyway.
Yes, there is already shebang detection for many file types. I still am concerned about performance hits if that number explodes.
We only detect shebangs for a select few languages; we should broaden this.