addon ok in 2.75 and 2.76 and lagging in 2.77 and 2.78

Hi guys, i need to check something with you before reporting it as a bug.

I wrote an addon for poly creation. It is a macro, heavy with on-screen drawing and modifying objects: (13.1 KB)

The same version works fine in 2.75 and 2.76 while there appears to be some kind of lag after the end of command (significant viewport performance drop) in 2.77 and 2.78 test build. I guess it is due to the new python version.

When i press TABx2 (enter & exit edit mode) the performance is back to normal, so i guess it is some kind of scene refresh thing. Is there maybe something i can change in the addon so it can work as in 2.75?

Not 100 % sure, but it seems that in 2.78 RC1 this issue is resolved! Thanks!