So I looked at the file...
The 'real-time' slowdown is definitely is due to my suspicions....the extra time required to interpolate particles at subframes is contributing to the slowdown. I did notice an area where a minor optimization could be added to my code, to help speed up interpolating caches that contain only a small number of particles (which does apply in this case). But the optimization only saves a few milliseconds - it ultimately may not be noticeable in a lot of cases.
As for the script vs non-realtime playback...they're virtually identical on my machine....with the only difference being the non-realtime playback having an extremely minor stutter occasionally...but that stutter persists even if I delete all objects from the scene. Could be caused by any number of things...like extra callbacks happening within Max during playback that don't happen during the script execution. Hard to debug something like that since it doesn't seem related to tyFlow...especially when I'm getting like 200fps playback on my machine in both tests and the stutter is virtually imperceptible.
On extra thing you can do if realtime playback is important to your setup, is enable "round to nearest frame" in all tyCache 'Timing' rollouts. That will disable any subframe evaluations and should speed up playback when 'realtime' is enabled.
The 'real-time' slowdown is definitely is due to my suspicions....the extra time required to interpolate particles at subframes is contributing to the slowdown. I did notice an area where a minor optimization could be added to my code, to help speed up interpolating caches that contain only a small number of particles (which does apply in this case). But the optimization only saves a few milliseconds - it ultimately may not be noticeable in a lot of cases.
As for the script vs non-realtime playback...they're virtually identical on my machine....with the only difference being the non-realtime playback having an extremely minor stutter occasionally...but that stutter persists even if I delete all objects from the scene. Could be caused by any number of things...like extra callbacks happening within Max during playback that don't happen during the script execution. Hard to debug something like that since it doesn't seem related to tyFlow...especially when I'm getting like 200fps playback on my machine in both tests and the stutter is virtually imperceptible.
On extra thing you can do if realtime playback is important to your setup, is enable "round to nearest frame" in all tyCache 'Timing' rollouts. That will disable any subframe evaluations and should speed up playback when 'realtime' is enabled.