ReactiveX / ReactiveX/rxjs

Throttle with timeout is producing infinite stack traces

Open
#4,963 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
31.7k
Forks
3k
PR merge metrics
No merged PRs in 30d

Description

Bug Report

Current Behavior

Throttle with interval (not throttleTime becuase I need leading & trailing) is creating a very long stack trace of repeated setInterval:

image

Reproduction
no reproduction, need to debug stack trace.

this.updateSubject.pipe(throttle(() => interval(5000), {
            leading: true,
            trailing: true
        })).subscribe(() => this.doAction());

Expected behavior
should not create larger and larger stack traces

Environment

  • Runtime: Chrome latest
  • RxJS version: 6.3.3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the provided throttle(() => interval(5000), { leading: true, trailing: true }) pipeline in RxJS 6.3.3 and investigate the repeated setInterval stack trace in Chrome. The report provides no reproduction, file, or test location; done means determining whether the stack growth is a bug and covering the behavior with an appropriate regression test or clarified expectation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.