Is there a way to speed up Confluence Server when developing with the Atlassian Plugin SDK?


#1

When changing any code (Java classes, Velocity templates etc.) in my plugin and after having done atlas-mvn package and having the changes picked up by QuickReload, when trying to load a page anew in the browser it can take up to 3 minutes to load. :frowning: Is there a way to speed that up somehow? I’ve seen instructions for disabling Synchrony, but didn’t get that working yet, is it worth to invest time in?


#2

This only happens to me when I’m accessing my local dev app via ‘sbehnke-laptop:8090/confluence’ on my work VPN. Something about DNS and hostnames. If I simply use ‘localhost:8090/confluence’ instead, things work quickly.


#3

Hi @paul.folder

Confluence, compared with the other Atlassian products, was incredibly slow for me also, when started with the atlas commands. Which helped a bit, is starting with atlas-run --server localhost. This way you bypass all the networking effort, like DNS resolution, routing and things like that. That is, what @steve.behnke mentioned.
In addition, you can try to give Confluence and the JVM more memory, and see if this results in better performance.

Cheers,
Alexander


#4

Have you tried increasing memory through the jvmArgs property?

<plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-confluence-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <jvmArgs>-Xmx2048m</jvmArgs>
                    <containerId>tomcat8x</containerId>
                    <server>localhost</server>
                    <productVersion>${confluence.version}</productVersion>
                    <productDataVersion>${confluence.data.version}</productDataVersion>
                    <enableQuickReload>true</enableQuickReload>
                    <enableFastdev>false</enableFastdev>

                    <!-- See here for an explanation of default instructions: -->
                    <!-- https://developer.atlassian.com/docs/advanced-topics/configuration-of-instructions-in-atlassian-plugins -->
                    <instructions>
                        <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>

                        <!-- Add package to export here -->
                        <Export-Package>com.atlassian.community.confluence.api,</Export-Package>

                        <!-- Add package import here -->
                        <Import-Package>
                            org.springframework.osgi.*;resolution:="optional",
                            org.eclipse.gemini.blueprint.*;resolution:="optional",
                            *
                        </Import-Package>

                        <!-- Ensure plugin is spring powered -->
                        <Spring-Context>*</Spring-Context>
                    </instructions>
                </configuration>
            </plugin>

#5

atlas-cli and then using pi is relatively fast. I’m not sure why Atlassian is deprecating it, but it still seems to work as of now. It takes only 1 to 2 seconds typically to recompile and redeploy an add-on.