iframe-resizer
iframe-resizer copied to clipboard
add a debounceInterval parameter
Hello,
To reduce the performance impact of iframe-resizer could you add a parameter to increase the interval between analysis of the mutations ?
What I have in mind would simply be to put a var instead of 16 here: https://github.com/davidjbradshaw/iframe-resizer/blob/master/src/iframeResizer.js#L858
I use lowestElement and I think 32 ms would be good enough for use cases where performance is an issue.
Great library by the way :)
Have a look how this code works in the iFrame. Times the calculations and slows the interval if it takes to long. When I next have some spare time I'll add this to the list of things to look at. Or feel free to submit a PR along those lines.