Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
9dd70a44
Commit
9dd70a44
authored
Sep 17, 2010
by
John Resig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding a simple file for doing .css() performance testing.
parent
8691a826
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4447 additions
and
2534 deletions
+4447
-2534
css.html
speed/css.html
+49
-0
jquery-basis.js
speed/jquery-basis.js
+4398
-2534
No files found.
speed/css.html
0 → 100644
View file @
9dd70a44
<!doctype html>
<html>
<head>
<title>
Test Event Handling Performance
</title>
<script
src=
"benchmark.js"
></script>
<script
src=
"jquery-basis.js"
></script>
<script>
var
old
=
jQuery
.
noConflict
(
true
);
</script>
<script
src=
"../dist/jquery.js"
></script>
<script>
var
events
=
[],
num
=
400
,
exec
=
false
;
jQuery
(
function
(){
var
p
=
old
(
"p"
);
var
s
=
(
new
Date
).
getTime
();
for
(
var
n
=
0
;
n
<
5
;
n
++
)
{
for
(
var
i
=
0
;
i
<
num
;
i
++
)
{
p
.
css
(
"position"
);
p
.
css
(
"top"
);
p
.
css
(
"left"
);
p
.
css
(
"display"
);
}
}
var
oldNum
=
(
new
Date
).
getTime
()
-
s
;
p
=
jQuery
(
"p"
);
s
=
(
new
Date
).
getTime
();
for
(
var
n
=
0
;
n
<
5
;
n
++
)
{
for
(
var
i
=
0
;
i
<
num
;
i
++
)
{
p
.
css
(
"position"
);
p
.
css
(
"top"
);
p
.
css
(
"left"
);
p
.
css
(
"display"
);
}
}
var
curNum
=
(
new
Date
).
getTime
()
-
s
;
jQuery
(
"#num"
).
text
(
old
.
fn
.
jquery
+
": "
+
oldNum
+
" "
+
jQuery
.
fn
.
jquery
+
": "
+
curNum
);
});
</script>
<style>p
{
position
:
absolute
;
top
:
5px
;
left
:
5px
;
}
</style>
</head>
<body>
<p
id=
"num"
>
Hello there!
</p>
</body>
</html>
speed/jquery-basis.js
View file @
9dd70a44
This diff is collapsed.
Click to expand it.
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