-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Support router serialization. #90
Conversation
f9a6641
to
9c1c805
Compare
router = new RouteRecognizer(); | ||
router.map = function() { | ||
var original = new RouteRecognizer(); | ||
original.map(...arguments); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably the parse error.
Uh-oh, benchmarks aren't good:
I'm not sure why it's slow yet. |
new RouteRecognizer(serialized); | ||
|
||
// Look up time is constant | ||
router.recognize('/posts/1'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking at the wrong RR instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, rerunning benchmark now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No faster: it wouldn't be, thinking about it. That new RouteRecognizer(serialized);
is stupidly expensive for some reason.
@krisselden Can I steal some of your time to learn what I'm doing wrong on the performance side here? I'm going to delay aiming for 100% compatibility until I know it makes sense to do so. Edit: see below, "simple" problem. No need to involve you yet. 😛 |
Found the problem: $ ls -la out.json
-rw-r--r-- 1 user group 63414305 May 3 18:44 out.json
|
99fc94a
to
6dce76b
Compare
Can we start having the conversation about whether/how to land the dramatic refactoring currently living in trie.js once I finish making it 100% API compatible? |
40cfbe9
to
d082032
Compare
Closing in on correct, taking a look at early benchmarks. Add and End-to-end seem to be doing something terribly wrong; I suspect that the We're likely going to trade runtime performance for serialized performance here (in add), but I want to keep runtime within striking distance of serialized. This means that Add and End-to-end need to reach hundreds of op/s. I need to rebuild serialization for the trie method to see what we're looking at for rehydration speed as well as JSON file size.
|
f919fd0
to
5d39913
Compare
New benchmarks with JIT compacting. JIT
Updates:
|
ee82470
to
6dc8453
Compare
6e336cd
to
dde5780
Compare
dde5780
to
8ab70f9
Compare
ef888f6
to
9e10f5f
Compare
Current status:
|
c4631a6
to
de17cef
Compare
b7a34b5
to
0886e6e
Compare
3fce026
to
19d44d9
Compare
Superseded by ember-route-recognizer. |
Currently works for all scenarios excepting late-additions via
delegate
. This may support those and I may just have broken tests, but I'm unsure.Current status: