skip highlighting large lockfiles on all instances, not just dotcom#63366
Conversation
This is a slow and CPU-intensive task, and there is little value in syntax-highlighting lockfiles. Just disable this on all instances, not only dotcom.
keegancsmith
left a comment
There was a problem hiding this comment.
yeah agree, this shouldn't just be dotcom. Looking at the code though I don't see any checks on file size? If the file is small enough I don't understand why we don't highlight it. We have the content right there to check size.
Out of interest how did you come across this? This seems like something that would affect any large file, and maybe there is a strategy to improve our decision making that doesn't involve a dissallow list.
I came across it by looking for places where we are special-casing dotcom. I agree this should probably be based on file size. Filed: https://linear.app/sourcegraph/issue/SRCH-610/dont-syntax-highlight-large-files. |
This is a slow and CPU-intensive task, and there is little value in syntax-highlighting lockfiles. Just disable this on all instances, not only dotcom.
Test plan
CI
Changelog
package-lock.json) because it is CPU-intensive on these large files and very rarely desirable.