Commit fb8ef9d1 authored by Romain Courteaud's avatar Romain Courteaud

Add some test pages to check renderJS memory consumption.

parent 6d7b391f
<!DOCTYPE html>
<html>
<head>
<title>Memory consumption for declareGadget</title>
<meta name="viewport" content="width=device-width, height=device-height"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src="../node_modules/rsvp/dist/rsvp-2.0.4.js" type="text/javascript"></script>
<script src="../dist/renderjs-latest.js" type="text/javascript"></script>
<script src="declareGadget.js" type="text/javascript"></script>
</head>
<body>
<div></div>
</body>
</html>
/*jslint nomen: true*/
(function (window, rJS) {
"use strict";
rJS(window)
.onLoop(function createNewChildOnLoop() {
var gadget = this;
return this.declareGadget('sub1.html', {scope: 'foo'})
.push(function (sub_gadget) {
var div = gadget.element.querySelector('div');
while (div.firstChild) {
div.removeChild(div.firstChild);
}
div.appendChild(sub_gadget.element);
});
});
}(window, rJS));
<!DOCTYPE html>
<html>
<head>
<title>Memory consumption for declareMethd</title>
<meta name="viewport" content="width=device-width, height=device-height"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src="../node_modules/rsvp/dist/rsvp-2.0.4.js" type="text/javascript"></script>
<script src="../dist/renderjs-latest.js" type="text/javascript"></script>
<script src="method.js" type="text/javascript"></script>
</head>
<body>
<div></div>
</body>
</html>
/*jslint nomen: true*/
(function (window, rJS) {
"use strict";
rJS(window)
.declareMethod('doNothing', function doNothing() {
return;
})
.onLoop(function iterateLoop() {
return this.doNothing();
});
}(window, rJS));
<!DOCTYPE html>
<html>
<head>
<title>Memory consumption for onLoop</title>
<meta name="viewport" content="width=device-width, height=device-height"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src="../node_modules/rsvp/dist/rsvp-2.0.4.js" type="text/javascript"></script>
<script src="../dist/renderjs-latest.js" type="text/javascript"></script>
<script src="onloop.js" type="text/javascript"></script>
</head>
<body>
<div></div>
</body>
</html>
/*jslint nomen: true*/
(function (window, rJS) {
"use strict";
rJS(window)
.declareMethod('doNothing', function doNothing() {
return;
})
.onLoop(function iterateLoop() {
return new RSVP.Queue();
});
}(window, rJS));
<!DOCTYPE html>
<html>
<head>
<title>Sub1 gadget</title>
<meta name="viewport" content="width=device-width, height=device-height"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src="../node_modules/rsvp/dist/rsvp-2.0.4.js" type="text/javascript"></script>
<script src="../dist/renderjs-latest.js" type="text/javascript"></script>
</head>
<body>
Subgadget 1
<div data-gadget-url="sub2.html"></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>Sub2 gadget</title>
<meta name="viewport" content="width=device-width, height=device-height"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src="../node_modules/rsvp/dist/rsvp-2.0.4.js" type="text/javascript"></script>
<script src="../dist/renderjs-latest.js" type="text/javascript"></script>
</head>
<body>
Foobar
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment