How to increase the speed of a component made from Javascript or jQuery?

I want to make my component faster, I use Javascript and JQuery to create it. I am using a JSON object to communicate with a component, and the back-end is python. Is there any suggestion to make the component faster?

+3
source share
3 answers

Set up some analysis to see what takes time to process. Then decide if you want to try to optimize javascript and client code, up / down communication with the server, or actual python execution speed. When you decide what you want to do faster, you can send samples of this site to this site, and people will probably want to help you.

+1
source

On the client side, you can compare your script (s) with getTime()

var start = (new Date).getTime();
 /* Run your script. */
var diff = (new Date).getTime() - start;
alert(diff)

And let's see what exactly happens in the script. But its hard to say what can be optimized if you do not publish any code.

0
source

- , , js , jQuery javascript .

jQuery "" $(), ( , $() 100 + ).

0

Source: https://habr.com/ru/post/1745402/


All Articles