I am trying to load all the ContentControls in the document. After that they need to be edited via a user-action. Inserting HTML works fine for the first few insertions but after the 3rd or so it keeps getting slower. It can take up to 5 minutes to insert the text, which is not suitable for a Taskpane Add In which should update live when the user types into a textbox.
I recreated the issue in ScriptLab. The Code loads all ContentControls like the real Add In and then shows a button InsertHTML which will insert 'a's into every ContentControl tagged with 'test'. It uses the insertHTML(<html>, 'Replace)-Method to do so. With every click on the button it gets worse.
https://gist.github.com/tillkaemmerer/6064d759dd1dbfd310378f9097d8fcdb
This problem occurs only in Word Online (Build 16.0.13924.41001). Word Desktop (Build 13801.20360) works fine.