Performance issues calling attachmentManager.saveAttachments() on Confluence 7.19 with synchrony enabled and many incoming page links

We have a case where calling attachmentManager.saveAttachments() on Confluence 7.19 with synchrony enabled is taking a very long time to complete, if it does. This happens when the number of incoming page links gets large (1.5k in our test).

We tested using draw.io, gliffy and a PlantUML plugin.

With synchrony off the save time is a few seconds.

With synchrony on draw.io and gliffy take around 4 minutes to save on our test instance, and PlantUML around 2. Note that draw.io and gliffy save two attachments, the plant app saves one.

I opened a ticket with atlassian, but they will not class it as a bug, only a feature request. I was also told that draw.io needs to “modify its code to better communicate with Confluence”.

So, atlas devs, anyone know of an alternative to attachmentManager.saveAttachments()? AttachmentManager is deprecated and AttachmentService was added. AttachmentService is marked as an experimental API, and we and several other app vendors have failed to get it to work correctly.

So, we’re stuck with diagrams not saving on page with a lot of incoming links and paying customers (rightly) expecting us to fix it.