Prevent macro execution after saving

Hi there,
I’ve developed a Confluence xhtml-macro (Server/DC). After saving the page with the configured macro it renders the macro and the execute-Method is called. But I only want the macro to be executed on page view, not page updated. Is there a possibility to prevent the execution/rendering after saving page (and macro)? Or a possibility in the execute-Method to distinguish if execute is called by page saving or viewing? I don’t think so but maybe someone has an idea.

Thanks in advance!