Skip to content

Performance analysis

This tutorial guides you through optimizing mobile web applications with WebDebugX’s performance tooling. You will learn how to analyze CPU usage, memory consumption and rendering performance, and how to identify performance bottlenecks.

WebDebugX’s performance tooling gives you comprehensive monitoring and analysis, helping you:

  • Analyze CPU usage and hotspots
  • Monitor memory usage and leaks
  • Analyze page rendering performance
  • Identify JavaScript performance bottlenecks
  • Optimize resource loading and rendering
  • Improve responsiveness and user experience

Tip: performance analysis works for every supported debugging target, including iOS Safari, iOS WebView, Android Chrome and Android WebView. Some metrics and analysis methods are platform-specific.

  1. Connect your mobile device to the computer
  2. Select the target you want to debug in WebDebugX (a browser or an app)
  3. Click the Performance tab to open the performance panel
  4. Make sure Record performance is enabled
  5. Click Start recording to begin capturing performance data

CPU analysis helps you understand where the application spends its time.

  • Overall CPU usage: the percentage of CPU the application is using
  • CPU usage timeline: how CPU usage changes over time
  • CPU usage distribution: how usage is distributed across threads or processes
  1. In the performance panel, switch to the JavaScript tab
  2. View execution time and call count per function
  3. Identify long-running functions (hotspots)
  4. Analyze the call stacks and call relationships
  1. In the performance panel, switch to the Flame chart view
  2. The flame chart shows the call stack and time distribution
  3. Width represents execution time, height represents call stack depth
  4. Colour distinguishes functions or modules
  5. Click a section of the chart to view details

Based on the CPU analysis, WebDebugX suggests JavaScript optimizations:

  • Identify frequently called functions and consider caching their results
  • Find long-running functions and consider splitting or optimizing them
  • Identify unnecessary computation or repeated work
  • Suggest moving intensive computation into Web Workers
  • Overall memory usage: how much memory the application uses
  • Memory usage timeline: how memory usage changes over time
  • Memory allocation: allocation broken down by object type
  1. In the performance panel, switch to the Memory tab
  2. Choose the Heap snapshot analysis type
  3. Click Take snapshot to capture the current heap state
  4. Analyze object types, sizes and reference relationships in the heap
  5. Compare several snapshots to identify leaks
  1. In the Memory tab, choose the Allocation timeline analysis type
  2. Click Start recording to begin capturing allocations
  3. Exercise the application
  4. Click Stop recording to finish
  5. Analyze the allocation timeline and patterns
  1. Take an initial heap snapshot when the application starts
  2. Perform the operations you suspect of leaking
  3. Take another heap snapshot
  4. Compare the two snapshots and look for objects that keep growing
  5. Analyze the reference chains of those objects to find the source of the leak
  • Live frame rate: the current frame rate
  • Frame rate timeline: how frame rate changes over time
  • Frame rate distribution: how frames fall across frame-rate ranges
  • Dropped frame detection: identify frame-rate drops and dropped frames
  1. In the performance panel, switch to the Rendering tab
  2. View the timeline of rendering events
  3. Analyze the layout, paint and composite stages
  4. Identify rendering bottlenecks and optimization opportunities
  1. In the rendering timeline, look for frequent layout calculations
  2. Identify the JavaScript causing the thrashing
  3. Analyze why and how often layout is being recalculated
  4. Apply the suggested fixes — batch DOM operations, use CSS transforms, and so on
  • Reduce reflow and repaint
  • Use CSS transform and opacity for animation
  • Avoid forced synchronous layout
  • Optimize CSS selectors
  • Use will-change to hint the browser
  • Load order: the chronological order in which resources load
  • Load time: how long each resource takes
  • Blocking analysis: which resources block rendering
  • Dependencies: how resources depend on each other
  1. In the performance panel, switch to the Critical path view
  2. See which CSS and JavaScript block rendering
  3. Analyze DOM and CSSOM construction
  4. Identify opportunities to shorten the critical rendering path
  • Optimize the resource loading order
  • Load non-critical JavaScript asynchronously
  • Inline critical CSS
  • Compress and reduce resource sizes
  • Use resource hints such as preload and prefetch
  • First Contentful Paint (FCP): when content first appears
  • Largest Contentful Paint (LCP): when the largest content element finishes rendering
  • First Input Delay (FID): how long the page takes to respond to the first interaction
  • Cumulative Layout Shift (CLS): a measure of visual stability
  • Reduce JavaScript execution time
  • Optimize DOM operations
  • Use Web Workers
  • Implement code splitting
  • Compress and combine resources
  • Use a CDN
  • Preload resources
  • Optimize image loading
  • Reduce reflow and repaint
  • Use CSS animation
  • Optimize layout calculation
  • Implement virtual scrolling
  • Compare performance between versions
  • Analyze performance trends
  • Set performance baselines
  • Monitor for performance regressions
  • Create custom performance metrics
  • Set performance alerts
  • Export performance reports
  • Integrate with performance monitoring
  1. Performance data looks wrong

    • Check the device state
    • Confirm the analysis settings
    • Restart the analysis
    • Update WebDebugX
  2. The analysis tool is unresponsive

    • Check the device connection
    • Restart the analysis tool
    • Clear cached data
    • Update to a newer version
  3. Optimizations have no effect

    • Re-check the optimization plan
    • Analyze the bottleneck again
    • Adjust the optimization strategy
    • Run an A/B test
  • Profile regularly
  • Establish performance baselines
  • Monitor performance changes
  • Keep optimizing incrementally