3 ms·
100k LOC would be, let's be generous, about 8 million characters (80/line average, which is high). 8GB of RAM for 8MB of input seems excessive to me. What's goi
by Jtsummers 6y ago
100k LOC would be, let's be generous, about 8 million characters (80/line average, which is high). 8GB of RAM for 8MB of input seems excessive to me. What's going on with that IDE that it needs so much for something so small? Even if that were 8 million distinct tokens/symbols in the input, that's still 1KB/token of memory consumed.
- CapsAdmin 6y agoI would assume code analysis. 8gb still sounds a bit excessive but given how long java stack traces can be maybe it's not so strange.
- z3t4 6y agoFor every key stroke a new immutable string is created with the content of the file/state. Plus data structure for AST/static analysis of every file in the project including dependencies. Plus another copy of the file for rendering with syntax highlight. One would think all this copying of data is very inefficient, but computers are good at moving data around. The most costly is rendering the glyphs.
- aledalgrande 6y agoExcept that is only what an IDE does at the very minimum. An IDE loads plugins, provides intellisense, documentation, potentially loads documentation of all the libraries, watches files, displays Git status, parses your code for syntax highlighting etc. etc. You're not opening a TXT file with 100K lines in it.