Poor performance in addon

I’m a contributor to this Blender addon, which enables Blender to import/export a specialized model format for a video game. The number of custom properties needed to fully represent all the needed values is quite extensive.

The main performance drain comes from when some of these custom properties are animated. For example, if an “M3 Particle” is added, performance will be OK, but if a keyframe is then added to any of its animatable properties, than the performance takes a very noticeable hit, particularly the UI will refresh very slowly, which makes things frustrating.

Is there some trick that can be used to prevent this from happening? Is the code just simply bad? Is there a way to fix it at all? Ultimately I’d like to get to the bottom of it and fix it, but I’m not great with the Blender API or Python, so I don’t really know where to start…