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

iced::time::every does not work well on web #18

Description

@ISibboI

Thank you for creating iced_web, it makes it amazingly simple to create a UI that also works in the browser!

I am using a substription to a timer event to drive updates in my application with iced::time::every with an interval of ~0.016 seconds. On desktop, that works without issues and my framerate measurement shows the targeted 60fps with only minor deviations.

On web though, this seems to work rather badly. I usually get some 4fps, sometimes it jumps to 20 or 40, and sometimes it hangs for a few seconds.

Note that the same application worked totally smoothly both on web and desktop when I used an "update loop" before, i.e. I let the update method return an update event. Then the framerate was not limited though and I got some 160fps on web, being a bit wasteful. Therefore, it would be nice if the timed events would be more accurate on web.

Is this an issue of iced_web, or of some of the underlying crates/mechanisms in the browser?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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