Optimizing a jquery user interface application
Without actual code, we cannot review it if it actually contains significant issues. Thus, I've set forth guidelines instead.
Compression
The real help that compression does is actually speeding up loading times. Unless you are actually loading scripts on demand on mouseover, then you might need to compress them.
However, a better solution is to actually preload these resources, or load them in parallel, and execute once available. That's pretty much how RequireJS does things. That way, you are not actually waiting for resources. The same thing is also true for other resources like fonts, images, cursors, videos and all the rest.
Other scripts
Anyways, there are a lot of things that could cause your script to go wrong, and that includes other scripts on the page. Due to the fact that JS is naturally single-threaded (unless made to thread), any blocking operation, be it in other scripts or within your script, could potentially be slowing down your entire operation. An example is a very long loop, or SJAX (Synchronouse XHR).
To make sure that it's not your script that's breaking apart, try isolating your development enviroment to only your script and a minimal version of the UI and without other scripts. Also, test other functionalities on the page without your script to verify that it's another script that is causing the problem.
&gt;700ms === lag
Yes, that's true. According to a YUI video on their YouTube channel, 200ms is considered &quot;instant&quot; in the perspective of the user. That also explains that game latencies of &lt;200 are best. However, in your case, 2-3 seconds? The user has already left your page by then.
Aim for responsiveness that are less than or are in the range of 200-300ms. And yes, your boss is for real and knows what he's doing.
Hey! Cache!
Your script is potentially DOM heavy by its looks and description. But DOM manipulation is heavy work. Cache as much as possible whenever possible, especially on elements that don't change over the lifetime of the page.
Also, minimize fetching stuff on the DOM.