Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Stop serializing turns. Generate them after loading the map. #746#786

Draft
dabreegster wants to merge1 commit intomain
base:main
Choose a base branch
Loading
fromlazy_turns

Conversation

dabreegster
Copy link
Collaborator

Turns can be generated from other data, so we can save space by not serializing them. Does it help?

  • huge_seattle, release mode, native
    • before: 258MB, 11.8s to load in UI (read the file, create DrawMap)
    • after: 218MB, 10.1s
  • central_seattle, debug mode, native
    • before: 54MB, 25.6s total
    • after: 43MB, 23.4s total
    • just deserializing the file drops from 8.4s to 6s
    • almost 1s spent reconstructing the turns

I'm now measuring on web. No parallelism there, so regenerating turns might be much slower.

Also need to silence the warnings when we generate turns; it's quite a spammy experience to just load a map.

@Robinlovelace
Copy link
Contributor

10% speed-up pretty impressive. Great work on diagnosing these areas where efficiency gains can be found!

@dabreegster
Copy link
CollaboratorAuthor

Awww, this is a no-go for now. Creating turns serially on web is too slow.

  • central_seattle: 4.2s before, 5s after
  • huge_seattle: 12s before, 16.8s after

If there's an easy way to use web workers, we could try subbing it in

#[cfg(target_arch ="wasm32")]
. Looks like some crates require nightly rust:https://crates.io/crates/wasm-futures-executor,https://crates.io/crates/wasm-mt,https://crates.io/crates/wasm-bindgen-rayon. I think some of the approaches require browser support for modules in web workers or shared memory that isn't widely available:https://crates.io/crates/web_worker,https://crates.io/crates/wasm_thread. So... probably blocked.

@dabreegsterdabreegster mentioned this pull requestNov 24, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@xorozoxorozoxorozo approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@dabreegster@Robinlovelace@xorozo

[8]ページ先頭

©2009-2025 Movatter.jp