mixpanel-js
mixpanel-js copied to clipboard
Use requestIdleCallback?
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?

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!