Skip to content

Performance issue with Timer #6

Closed
@Byron

Description

@Byron

This 'regression' appears a while ago in criner, and apparently went unnoticed when switching from tokio::time::Delay to async_io::Timer.

Screenshot 2020-07-24 at 10 17 31

The picture above shows a criner process doing nothing, consuming 10 to 15% of CPU for displaying 4 progress bars which update once per second. The expensive part of this used to be the drawing itself, but now it appears to be dominated by the condvar in parking.

In smol 0.1.5 using smol::Timer, this looked like that:

Screenshot 2020-07-24 at 11 00 55

All that shows up is the drawing of the TUI.

Having had a look myself I am absolutely puzzled as to why that is - the code looks very similar.

Any hint at how to solve this would be greatly appreciated.
Thank you

Meta

Screenshot 2020-07-24 at 11 20 58

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