Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Signup Performance

Han
October 23, 2012

Signup Performance

Identifying and alleviating the bottleneck for a social networking site's signup process.

Han

October 23, 2012
Tweet

More Decks by Han

Other Decks in Programming

Transcript

  1. Architecture Account Activation Signup Success Welcome Page Note that both

    pages need to load in order for the user to start using the site! Conversion Tracking JavaScripts
  2. Pre-optimization Benchmark !   Deployment branch, dev database: 11029 milliseconds

    !   Deployment branch, test database: 30683 milliseconds !   Average of 10 test runs per system !   Empty browser cache for each run, but populated symfony cache which is a reasonable assumption
  3. YSlow Recommendations !   Make fewer HTTP requests !  

    Use a CDN (content delivery network) !   Compress components with gzip !   Add Expires headers !   Put JavaScript at bottom !   Use cookie-free domains VERDICT: Minimal gains, hard to test, not worthwhile!
  4. Bottleneck !   Extra unnecessary page load is slowing everything

    down! !   Removing the intermediary page will save time by eliminating the following: !   JavaScript redirect time !   Processing required by Symfony for the redirect page !   HTTP request/response for the redirect page and assets !   Tweaking the minor issues reported by YSlow may help speed up the site as well, but are negligible in comparison and also hard to measure between dev and prod envs.
  5. Solution !   Remove the extraneous “Redirecting…” page, going directly

    to the Welcome page and loading the async conversion JavaScript files there. !   Only load the conversion JavaScript if the referrer is the Join page, otherwise conversion counts will be incorrectly duplicated. !   Load each conversion JavaScript in the <head> to make sure they load before the page loads, so that the user can’t click away before the conversion is recorded.
  6. Proposed Architecture Account Activation Welcome Page Note that the scripts

    will only be loaded when the referrer is the account activation page. Conversion Tracking JavaScripts
  7. Post-optimization Benchmark !   Deployment branch, dev database: 8099 milliseconds

    compared to 11029 ms, a 26.5% improvement !   Deployment branch, test database: 19374 milliseconds compared to 30683 ms, a 36.9% improvement
  8. Conclusion !   Removing the redirect page improves user experience:

    !   saved round trip time for HTTP request/response !   saved JavaScript redirect time !   saved Symfony processing time !   Large time discrepancy between dev and testing benchmarks imply that database optimizations could help reduce page load times as well. !   Caveat is that this performance may not be replicated on production… still needs testing.
  9. Automation !   Signup tests were run using Selenium so

    I didn’t have to do it manually! !   Time elapsed was measured using system time between clicking on the Sign Up button and having the Welcome page fully loaded, mimicking user experience. !   Firebug requires adding two separate page load times and did not take into account browser processing time.