Skip to content
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

Precalculate deme and transmission data #402

Merged
merged 9 commits into from
Jul 21, 2017
Merged

Conversation

trvrb
Copy link
Member

@trvrb trvrb commented Jul 18, 2017

Resolves #392

This creates demeData and transmissionData in map state. These are flat objects listing every deme (there may be duplicates due to west and east triplication) and every transmission event. These are constructed on first load and then only updated on update operations (change color, change date slider, etc...).

Performance is roughly comparable at the moment. I'm getting 8ms for updateDemeAndTransmissionData for Ebola compared to 18ms on master. Large additional speed improvements could be gained from switching from arrays to dictionaries. However, this will complicate things I think best left until after Bezier (#381).

This is mostly working, but there's more to do here.

  • Change dataset needs to be fixed
  • Change geo resolution needs to be fixed

@trvrb
Copy link
Member Author

trvrb commented Jul 18, 2017

With commit 515e78a, Ebola is now running updateDemeAndTransmissionData in 3ms.

@trvrb
Copy link
Member Author

trvrb commented Jul 18, 2017

I think this is now good to go. @colinmegill could I request a review here? Please merge if you're satisfied or go ahead and make fixes. I'm not going to have much more a chance to work on this in the next few days.

@trvrb trvrb requested a review from colinmegill July 18, 2017 20:55
@trvrb trvrb self-assigned this Jul 18, 2017
@colinmegill
Copy link
Collaborator

Read through all of this, this looks really great. Merging now. Exciting to have smarter updates here.

@colinmegill colinmegill merged commit 3c7756e into master Jul 21, 2017
@colinmegill colinmegill deleted the 392-precalc-lat-longs branch July 21, 2017 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

precalculate LatLongs
2 participants