My employer is in a crossroads now: We've got an offer to create app for a large multinational company, interested in monitoring of a large fleet of vehicles simultaneously on a map. I'm talking about 5000 at the time. We tried to do that in our current web based app and it chokes due to quanity of objects, despite our efforts to optimize code. My question is: can we gain some performance boost if we convert our web based app into a desktop one via nodejs`s modules like node-webkit or atom-shell. Does a desktop app has a better access to a system resources? Web page is frozen beyond help and even gives me a message to mercy kill it, because processing is taken too long, but in a task manager it only uses about 18% of CPU and 2 GB of ram out of 16 GB.
1 Answer
No that wont help. Your code still runs in a webkit browser. The trick is to not show all 5000 objects at a time. Showing 5000 pins on a map is not useful to the user anyways, group markers that are close together (https://developers.google.com/maps/articles/toomanymarkers?hl=en);
as the user zooms in you can then show a more and more detailed view.
4 Comments
user1929437
Thank you for a response. Our clients wont budge on the cluster thing though. We are just interested in maximal code reuse while transferring to desktop app. If we are to start from a scratch, offer is off the table. The question is, can we use web technologies in a desktop app with better access to system resources? I'am javscript developer, so my mind always jumps to Node.js. Maybe there's alternatives?
Andreas Møller
I think you will have the same problem on desktop. rendering 5000 objects is a big task. more importantly the usablilty of a map view is gone if its clustered with pins media.svennerberg.com/2008/12/unclustered.jpg. I would recommend having a meeting with your client and explain the concept from a usability point of view.
user1929437
If we to ignore context, markers and such(because it is a curious thing for me, before a possibility to make money for my employer): Is there a way to have a better access to system resources for my app if it is to be written in Javascript with HTML and CSS? I'm currently looking into tint: trueinteractions.com
Andreas Møller
Cross compiling is not a great idea if you are micro optimising for performance. You are not doing you employer or you client a favour by trying a new technology you don't have any experience with. The number 1 step in optimising performance is to avoid unnecessary work. In this case that means not rendering 5000 markers