mixpanel-js icon indicating copy to clipboard operation
mixpanel-js copied to clipboard

Use requestIdleCallback?

Open slorber opened this issue 8 years ago • 1 comments

Hi,

To have lower impact on performances, wouldn't it be nice to call requestIdleCallback (if available) so that the tracking requests are actually scheduled with lower browser priority?

Currently Mixpanel requests are handled with high priority by default but I think it makes sense to make them lower priority / async by default unless user want them to be high priority?

image

slorber avatar Feb 03 '17 10:02 slorber

Great idea @slorber, it'll be helpful once more browsers implement it. We'll add to the feature request backlog, but as always if you feel strongly about a feature and want to help expedite it, the best way is with a Pull Request!

tdumitrescu avatar Feb 03 '17 16:02 tdumitrescu