Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript profiling on mobile devices

I am looking for tools that allow to perform profiling of websites on mobile devices similar to what Firebug and Chrome dev tools allow to do.

I have used Weinre quite extensive. While it is an awesome tool to use with real devices, it does not provide facilities for run-time profiling.

Has anyone heard or used any tools that allow to do so?

like image 241
Vasily Avatar asked Jan 25 '12 15:01

Vasily


People also ask

What is JavaScript profiling?

A JS profiler is an efficient tool to help you understand your code better – effectively finding, pinpointing and optimizing bottlenecks in your code. They're simple to run once you get used to the interface and it's likely you even have one built into your browser.


2 Answers

Here is a great list of mobile performance testing tools from Steve Sauders (the guy that wrote the book "High Performance Web Sites"):

  • Mobile Perf bookmarklet - An uber bookmarklet with links to multiple other bookmarklets useful for mobile (mine)
  • Jdrop - JSON in the cloud for gathering data on mobile devices (mine)
  • Mobitest - Connects WebPagetest.org to Android and iPhone devices (Blaze.io)
  • pcapperf - Get HTTP waterfall charts from your mobile device connected to a wifi hotspot, blog post (open source)
  • WebWait - The only way I can think of to measure page load times on real devices over 3G - load URL in an iframe (Michael Mahemoff)
  • weinre - Web Inspector Remote, very cool way to debug your mobile device remotely (Patrick Mueller)
  • Reflow Timer - Bookmarklet to measure reflow time (Lindsey Simon, open source)
  • Favelet Suite - An uber bookmarklet, tons of features! (slayeroffice)

Source: http://stevesouders.com/mobileperf/

UPDATE:

You can use Chrome Devtools with an Android device and you can use Safari Devtools on a Mac with an iOS device.

Chrome: https://developer.chrome.com/devtools/docs/remote-debugging

Safari: https://blog.idrsolutions.com/2015/02/remote-debugging-ios-safari-on-os-x-windows-and-linux/

You connect via USB

like image 164
Jasper Avatar answered Sep 17 '22 15:09

Jasper


You can profile/debug/inspect Chrome-on-Android using the desktop Chrome developer tools interface:

https://developers.google.com/chrome/mobile/docs/debugging

It'll require Chrome, an Android device able to run the Chrome app, and a USB cable.

Its a bit annoying to setup, because you have to install and use the ADB console command, but once its working, you'll have the full chrome developer tools interface available for debugging mobile.

Additionally, Google appears to be supporting this feature for new dev-tool Crhome extensions like PageSpeed.

like image 20
Seth Avatar answered Sep 20 '22 15:09

Seth