I switched from my custom haptic feedback solution to this library because I don't have time to maintain my own library, and noticed worse performance using this library when activating a series of rapid haptic (light impact) vibrations. After comparing with my code, my bet is that it is because on iOS, you allocate a new generator object every time the method is called. Instead, for best performance, you should only create one generator object for each type of feedback and re-use that object for future calls of the same time. This should create faster response time and take less energy. I'll create a PR for this later if I have time, but figured I'd mention it in case you want to take it on instead. Hopefully this makes sense, I can provide more details if needed.
I switched from my custom haptic feedback solution to this library because I don't have time to maintain my own library, and noticed worse performance using this library when activating a series of rapid haptic (light impact) vibrations. After comparing with my code, my bet is that it is because on iOS, you allocate a new generator object every time the method is called. Instead, for best performance, you should only create one generator object for each type of feedback and re-use that object for future calls of the same time. This should create faster response time and take less energy. I'll create a PR for this later if I have time, but figured I'd mention it in case you want to take it on instead. Hopefully this makes sense, I can provide more details if needed.