Hacker News new | past | comments | ask | show | jobs | submit login

> A computer just shouldn't need several seconds to load and parse a source file even if it has 100.000 lines.

Why? It doesn't just load the file, but also analyze it, find flaws and put it into a bigger picture which assists the user. And you don't need a last gen for this. I work on a 10 year old machine quite fine with a rather heavy IDE-Setup. Just accept that a computer can be your partner, helping you to reach your goal, and that he needs his time for doing his work too.




I love these weird, artificial "no true Scotsman" arguments that appear on HN when people are discussing little more than the colour of the bike shed. "Oh, but how does it do with 100k lines?" I can already tell you from my lovely, bloated IDE: Terrible. And, I don't care. Why? WTF is this file 100k lines!?


I know at my workplace, the vim&emacs-users are the reason for the codesinks here. They have no relevant penalty for growing everything in singles files, but they have some benefit as they can navigate code better with a poor setup. And at some point, reasons like "not destroying the git-history" and such are added to the list. And laziness might be another reason on that list.


Because your are not viewing those 100k lines at once ever. Taking that into consideration, enormous optimizations are possible.


The lines are all interconnected. Whether you view them or not, they still influence each in some way or another. And figuring this out is the hard part in coding and software-design, which the computer takes care of and assists you.


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.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: