asafkorem / COSTouchVisualizer

Visualize touches, gestures and long presses on your iPhone or iPad
https://www.conopsys.com/COSTouchVisualizer/
MIT License
960 stars 70 forks source link

CPU pegs to 100% when using COSTouchVisualizerWindow #24

Open klundberg opened 8 years ago

klundberg commented 8 years ago

We recently had to remove this library from our application as it was causing the CPU to be pegged at 100% even when the window's effects were not enabled. We had everything set up with the default configuration.

The problem line looked to be here: https://github.com/conopsys/COSTouchVisualizer/blob/master/Classes/COSTouchVisualizerWindow.m#L222 This timer constantly runs the target method for us even if the app user doesn't have the touch effects enabled at all, which is not ideal. Even if the effect was on, the timer shouldn't run if the visualization is not currently happening.

joeblau commented 8 years ago

Hm... Yeah there are quit a few problems in this library. I'm working on a Swift version, but I might make a pass though this and clean it up. Most of this was written when I had no idea what I was really doing :smile:, but I'm much better now.

klundberg commented 8 years ago

Cool, good to hear an updated variant is in the works!

lammertw commented 6 years ago

Any update on this? We're still using this library and just ran into this problem as well.