I write javascript many years ago when it was completely undisclosed. The size of the source code never exceeded 10 thousand lines, and it was the extreme side and a nightmare in compatibility with the browser.
However, over the past decade and a half, javascript has proven to be an effective language for developing many of its own tools, proof of conceptual designs, and complex web applications. As the size of the source code also expanded, one internal application, which has 2 years of continuous development, simply crossed 120 thousand lines of code, deleted empty lines and {on one line. As a single .js file, it is 5.5 MB. Last month, we noticed a sharp deterioration in the sensitivity of Dev Tools in Chrome to such an extent that sometimes it cannot be used, and in other cases Dev Tools does nothing for minuets, which cause an immunity warning when the focus is removed from the tab. We put it in code size.
- What would I like to know what are the limits in terms of ECMAScript code size?
- Is there a practical limit in terms of a reasonable client experience in browsers?
- Do individual browsers have an upper limit on the size of the source code?
In our own applications, there is not the slightest imagination that we will consider best practices, if it works, it all matters, if errors can be processed through the interface, they can be ignored. With this approach, one application has one main object that did not take into account (many, guessing 1000+) prototypes.
- In terms of prototype objects, how many are too many?
- Does it make sense when performance starts to degrade significantly?
- If possible, those who have experience with a large code base, please respond with your own affairs and do not?
- Finally, with large projects, what can be done to improve debugging performance (rather than rewriting) in Chrome? or is there a better debugger (FireFox, IE or?) for large projects?
Thanks in advance, and I'm not sure if such a difficult question is resolved here, I will cut it if it's too much.
source share