Popup creation

JavaScript performance comparison

Revision 5 of this test case created by Alexander Schmitz

Info

How quickly are popups created

Preparation code

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://babulina.go-nix.ca:8080/nix/jqm/popup.js"></script>
<link rel="stylesheet" href="http://babulina.go-nix.ca:8080/nix/jqm/css/themes/default/jquery.mobile.css" />
<div data-role="popup" id="thePopup">
  <p>This is a popup</p>
</div>
<script>
Benchmark.prototype.teardown = function() {
    $( ":mobile-popup" ).popup( "destroy" );
    $( ":mobile-popup2" ).popup2( "destroy" );
    $( ":mobile-popup3" ).popup3( "destroy" );
    $( ":mobile-popup4" ).popup4( "destroy" );
   
};
</script>

Preparation code output

This is a popup

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
1. Replaced option-setting loop with _setOptions()
$( "#thePopup" ).popup4();
pending…
2. using uiTemplate
$( "#thePopup" ).popup2();
pending…
3. JS ops in building widget
$( "#thePopup" ).popup3();
pending…
4. Original Popup
$( "#thePopup" ).popup();
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment