Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

All the lines being interconnected is a rare edge-case. Often there are multiple independent top level expressions in a file. Talking about code here, because that is the most common thing that needs to be highlighted and where lines influence each other potentially.

To make a simple example: Have multiple functions defined at the top level of the file? Great! Independent parts!

Of course it could be, that in one function another is called, but does that have to affect highlighting? Immediately?



The code model still needs to be built from the entire file, which I suspect is what most of the slowdown is when using an IDE (not highlighting, although the code model can inform advanced highlighting e.g. different colors for local vs instance vars).


Well, that is no justification for any slowdown. The "code model" does not need to be complete the moment I start an IDE or open a file or project in it. A temporarily incomplete model is very acceptable. More work can be put off to a background thread. It can be delayed until I perform the first action, that actually needs a complete model, like say a renaming of something. There are relatively few actions like that. Many facts can already be concluded from import statements in various languages.

Furthermore we are fighting a strawman here: Who in their right mind opens a 100k line code file in an IDE? And who in their right mind creates such a disaster in the first place? This is not a realistic scenario we are talking about here.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: