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

consider "proportional leniency" and "lonely tasks" #19

Open
Malkiz opened this issue Oct 10, 2019 · 1 comment
Open

consider "proportional leniency" and "lonely tasks" #19

Malkiz opened this issue Oct 10, 2019 · 1 comment

Comments

@Malkiz
Copy link

Malkiz commented Oct 10, 2019

I've read the documentation (cited by the README).
The docs say that the recommended behavior is "Definition 4: Combining proportional leniency and lonely tasks".

However I see nowhere in the code something that detects a "lonely task" in order to ignore it, and nothing that changes the "required quiet window size" (it's always 5000ms).

_longTaskFinishedCallback(performanceEntry) {
log(`Long task finished`, performanceEntry);
const taskEndTime = performanceEntry.startTime +
performanceEntry.duration;
this._longTasks.push({
start: performanceEntry.startTime,
end: taskEndTime,
});
this.rescheduleTimer(taskEndTime + 5000);
}

Is there a plan to implement that behavior?
If not, I think it should be made clear in the README, because right now the code in this repo doesn't do exactly what the docs say it does.

@Malkiz
Copy link
Author

Malkiz commented Oct 16, 2019

To whom it may concern: I implemented the missing spec in this PR: #21

Also -
I included some fixes that haven't been merged yet from other PR's, better cleanup (to allow GC) and more configuration control.

I don't have the time or energy to comply with all the "contribution guidelines" or split this into multiple PR's.
Use it however you want, or don't, I don't mind either way.

Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant