Update Smart Object without affecting history

I’m using Linked Smart Objects to periodically update a file being modified outside of Photoshop (and refreshing, say, once every second), as sending pixels seems impossible for now.

This works just fine, except my history gets polluted. I’m interested in just about any hack possible to avoid spamming the history. This can include manually editing the history (if at all possible), or using another method altogether to update the pixels of a background layer.

Thanks!

Edit: Another annoying aspect of this solution is that the cursor flickers whenever the update happens (for instance, if a brush tool is selected, it reverts to a pointer for a few frames). I doubt this is possible but it would be really nice if this can be avoided in some way or another.

You could create a history snapshot and keep overwriting that one, while deleting the most recent history step everytime you update.

But polling usually isn’t the greatest idea in general, maybe u can find a more efficient approach.
Maybe you could have the refresh controlled by user input? Or you could periodically check the file metadata for the dateModified property, and only update when there are changes.

So, this is one of the most annoying problems with UXP development, in my opinion. You can batch multiple actions together in one BatchPlay call, but there’s no way to turn off history if your user is, say, dragging a slider that updates the layer in real-time. ADOBE PLEASE FIX THIS!!!

If you delete the previous history state before you make the new state, it actually UNDOES the last action (IMO it shouldn’t…but does) which can have the strange side-effect of selecting the previous layer, losing the original state, or any number of problems.

The way I worked around it for slider change events isn’t pretty…but it works. I’m not sure how helpful it would be in your situation though.