Or does it depend on the way in which it is written?
My question is related to page rendering time. Can we determine which will give better performance?
Should we always choose a smaller sized plugin?
Or does it depend on the way in which it is written?
My question is related to page rendering time. Can we determine which will give better performance?
Should we always choose a smaller sized plugin?
Assuming you mean that the one plugin file has been minified, I would say in the majority of cases, yes.
But it really depends on hundreds of factors...
jquery distributes a "minified" version of the library. the code is stripped of inessential whitespace and other elements using a tool called JSMin. it's identical in function to the non-minified version, but loads much quicker. if you are debugging tho, you might find it easier to use the full version.
Only way to know is to measure it with tool like yslow or google page speed
e.g. I can write a simplest plugin which can halt your page rendering, or downloads too many things.
But usually if both are jquery plugin with exact same behaviour, shorter the better, but if you are comparing two different things e.g. one jquery plugin , one plain javascript then you must also consider the size of jquery library and such things.
If you mean that you have two plugins with comparable functionality, but different size (not just minified but really different code), the answer is: maybe. One thing is obviously for sure: the smaller plugin will load faster. But for a million reasons, the bigger plugin can be faster after that. Without benchmarks, you can only guess.