Closed
Bug 885984
Opened 11 years ago
Closed 11 years ago
Compiler: Replace methods (_resolve, _yield) with functional equivalents
Categories
(L20n :: JS Library, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
1.0
People
(Reporter: stas, Assigned: stas)
Details
Attachments
(1 file)
(deleted),
patch
|
Details | Diff | Splinter Review |
I realized that the logic of setting local.__this__ works better than I thought it did: it's set in Identifier, so there's no need to have _resolve and _yield methods of Entity and Attribute set it again.
I did some testing and the results are very promising because not calling any additional methods makes getting entities faster.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → stas
Priority: -- → P2
Target Milestone: --- → 1.0
Assignee | ||
Comment 1•11 years ago
|
||
Holy electrons, getting just got 4 times faster!
Mean times for settings.lol (via make perf), n = 50
(500x) master patch diff % diff
------------------------------------------
get 127 32 -95 -75%
Assignee | ||
Comment 2•11 years ago
|
||
Comment on attachment 766267 [details] [diff] [review]
Patch
Review of attachment 766267 [details] [diff] [review]:
-----------------------------------------------------------------
::: lib/l20n/compiler.js
@@ +791,1 @@
> return macro._call(ctxdata, evaluated_args);
I didn't remove Macro::_call because that would make calling macros in tests much harder and I didn't want to duplicate code here and in callExpression to avoid situation when a change is made to callExpression but tests continue to use the old code in _call.
Assignee | ||
Comment 3•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•