Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
renderjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
renderjs
Commits
00ea1fe0
Commit
00ea1fe0
authored
Nov 02, 2018
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip perf test
parent
14468ebc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
0 deletions
+77
-0
perf/declareGadgetSpeed.html
perf/declareGadgetSpeed.html
+33
-0
perf/declareGadgetSpeed.js
perf/declareGadgetSpeed.js
+44
-0
No files found.
perf/declareGadgetSpeed.html
0 → 100644
View file @
00ea1fe0
<!DOCTYPE html>
<!--
Copyright 2017, Nexedi SA
This program is free software: you can Use, Study, Modify and Redistribute
it under the terms of the GNU General Public License version 3, or (at your
option) any later version, as published by the Free Software Foundation.
You can also Link and Combine this program with other software covered by
the terms of any of the Free Software licenses or any of the Open Source
Initiative approved licenses and Convey the resulting work. Corresponding
source of such a combination shall include the source code for all other
software used.
This program is distributed WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See COPYING file for full licensing terms.
See https://www.nexedi.com/licensing for rationale and options.
-->
<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=
"declareGadgetSpeed.js"
type=
"text/javascript"
></script>
</head>
<body>
<div></div>
</body>
</html>
perf/declareGadgetSpeed.js
0 → 100644
View file @
00ea1fe0
/*jslint nomen: true*/
(
function
(
window
,
rJS
)
{
"
use strict
"
;
rJS
(
window
)
/*
.declareService(function () {
var list = [],
i;
for (i = 0; i < 10000; i += 1) {
// list.push(document.createElement('div'));
list.push(new RSVP.Queue());
}
this._list = list;
console.log('lala3');
return RSVP.all(list);
});
*/
.
declareService
(
function
()
{
var
gadget
=
this
,
count
=
1000
,
total
=
1
*
count
,
now
;
return
this
.
declareGadget
(
'
sub2.html
'
)
.
push
(
function
()
{
var
promise_list
=
[],
i
;
now
=
new
Date
();
for
(
i
=
0
;
i
<
count
;
i
+=
1
)
{
promise_list
.
push
(
gadget
.
declareGadget
(
'
sub2.html
'
));
}
gadget
.
element
.
textContent
=
'
Creating
'
+
total
+
'
gadgets...
'
;
return
RSVP
.
all
(
promise_list
);
})
.
push
(
function
()
{
var
stop
=
new
Date
(),
diff
=
stop
.
getTime
()
-
now
.
getTime
(),
duration
=
Math
.
abs
(
diff
/
1000
);
gadget
.
element
.
textContent
=
total
+
'
gadgets created in
'
+
duration
+
'
s (
'
+
diff
/
total
+
'
ms)
'
;
});
});
}(
window
,
rJS
));
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment