I’m working on a webapp in jquery that, on older machines or machines without much resources, may perform poorly. To get around this I’d like to make a degraded version that disables some of the features, particularly those that rely on large images.
How can I tell if my app is running poorly on the user’s computer in jquery or javascript in general? I just need a way to call a function that will degrade the app. (especially when the user may run low on system memory)
The only way I can think of is for manual user intervention, but the option would add clutter for users that don’t need it and users that do need it may not notice it.
Thanks!
There’s no way to tell before your javascript starts running. You could scatter some profiling Date objects around like so:
You should bear in mind that there’s other things that can affect a browser’s performance. If a user was already doing some intensive CPU operations this could cause their machine to switch to the basic mode even if they have a fairly capable computer.