Javascript library overhead

Does anyone know if there are studies that show performance overhead when using javascript libraries (except for the obvious time to load them) and using only basic javascript? The libraries are so huge these days, and I was curious.

From my degree in computer science, it seems like it should have growth n. (in other words, linear).

In terms of computer science, this is not a threat, but how does it affect page load time and page performance in milliseconds? I know that the CPU is a problem, RAM, etc. But is there any test that can measure such things?

I know that there is another factor: libraries are often optimized to do the same thing that you would manually code in a less optimized way, but libraries also have overhead, and not all of these functions will be used.

Edit: I found that this seems to fully answer my question, even if it started about something else: When to use Vanilla JavaScript vs. jQuery?

"As comments quickly comment (and I agree 100%), the above statements relate to the benchmarking benchmark." A stand-alone JavaScript solution (provided it is well written) will be superior to a jQuery solution that does the same (I would like to see an example anyway). JQuery speeds up development time, which is a significant advantage that I don't mean for understatement.This simplifies reading, ease of use of code, which is more than some developers can create on their own.

In my opinion, then the answer depends on what you are trying to achieve. If, I believe, based on your reference to performance advantages, you are after the highest possible speed of your application, then using jQuery introduces overhead every time you call $ (). If you are going to read, consistency, cross-browser compatibility, etc., then there are certain reasons to support jQuery over native JavaScript.

+7
source share
4 answers

This is a good question! Near the loading time of the library itself, most of the frameworks are not very many, which means that they do not delay the page display or something like that.

The JQuery $ .css method, which simplifies stylish elements, can become a performance bottleneck if you need to activate it very often and work directly on the style object much faster.

I believe it is better to do more with simple javascript, the more you should get high performance. For ordinary things like ajax requests, menu fading, etc. The performance of all the frameworks I have ever used is sufficient, and the encoding itself is accelerated in turn.

+1
source

It depends entirely on the library. However, for libraries like jQuery, this probably doesn't matter: the performance bottleneck is probably not jQuery, and Google provides jQuery hosted on the CDN, so it shouldn’t even affect the page load time and the ease of use that jQuery gives you far, far outweighs the slight impact on performance. Libraries can also use unusual or complex methods to improve performance, so using a library can sometimes be even faster than you write. There is really no final answer.

+1
source

Not being a direct answer to your question, my answer to this question is: "What are some empirical technical reasons not to use jQuery?" and other answers and comments may be of interest to your research, since many of them talk about problems with the efficiency of use, and not the use of JavaScript libraries and frameworks. Hope this helps.

+1
source

here is a performance study done with js library and venilla js for adding text

http://www.learningjquery.com/2009/03/43439-reasons-to-use-append-correctly

and I can say that using javascript for venilla is always faster than doing something with libraries. but if you want to save time on developing something, it would be nice if you use some kind of library that suits you.

0
source

All Articles