Skip to content

Separate delay for inactivity timeout #5

Open
@huyz

Description

@huyz

In my case, the responsiveness of the final call in a throttle is very important.
So I think I need a separate inactivity timeout.

For example, if some event happens during scrolls (say maybe every 5ms), it's nice to space out the actual callback calls to maybe 250ms, but once the scrolling is done, I would like the final callback call to come very quickly, maybe after 50ms of no calls to the throttled function. This is important to make things look right for the user.
I don't want to lower the current delay to 50ms because it slows down my page a lot.
Notice in my example that: 5 ms average interval < 50 ms < 250 ms

If you have no time for this, I could code it with a few tips from you to speed things up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions