Commit d38d1b9
committed
Further improve performance of Document creation.
This speeds up the create test by about **25-30%** by avoiding the call
to `util.assign()` in the `createDocument()` function. Instead of that
`Document#document` is now an accessor on the prototype, `defaultView`
is an instance of a new `DefaultView` class, whose instances have links
to the `document`, and finally the interesting constructors that are
exposed via `Document` instances are all installed on the `Document` and
`DefaultView` prototypes instead of the instances.1 parent f58a931 commit d38d1b9
1 file changed
+30
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
154 | 172 | | |
155 | 173 | | |
156 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
157 | 180 | | |
158 | 181 | | |
159 | 182 | | |
| |||
166 | 189 | | |
167 | 190 | | |
168 | 191 | | |
169 | | - | |
170 | 192 | | |
171 | 193 | | |
172 | 194 | | |
173 | 195 | | |
174 | 196 | | |
| 197 | + | |
175 | 198 | | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
190 | 203 | | |
191 | 204 | | |
192 | 205 | | |
| 206 | + | |
| 207 | + | |
193 | 208 | | |
194 | 209 | | |
195 | 210 | | |
196 | 211 | | |
197 | 212 | | |
198 | 213 | | |
199 | | - | |
200 | 214 | | |
201 | 215 | | |
202 | 216 | | |
| |||
0 commit comments