Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

WASM runtime API calls on Windows are very expensive #11275

@nazar-pc

Description

@nazar-pc

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Description of bug

We discovered in autonomys/subspace#307 that sync on Windows is extremely slow. I did some initial testing and discovered that every runtime API call on Windows takes ~5ms, resulting in sync speed of under 20 blocks/s with our chain, while under Linux I can sync with 500 blocks/s speed.

Not sure what the root cause is yet, but it is a UX issue for our chain and it seems to originate from Substrate, hence this issue.

UPD: With native runtime sync on Windows increases to ~350 blocks/s, runtime call cost vanished.

Steps to reproduce

https://github.com/subspace/subspace/blob/main/docs/farming.md can be used to run pre-built Windows binaries of our chain and see sync speed, it also has instructions for building from source in case you want to add instrumentation and recompile. I guess building any other chain for Windows will result in similar sync slowness.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions