Edit online

Documents Load Slowly

Problem

The browser takes a very long time to open a document.

Cause

There are a lot of reasons that can lead to a slow loading time (e.g. slow internet connection, bad customization that interferes with the document load process, large sized documents, etc).

Solution

In the most cases, the slow loading time is caused by a customization (a plugin or framework, or a custom option). In this case, it is recommended to try to reproduce the problem without any customizations.

Alternative Solution 1

In some cases, the problem can be solved by updating to the latest version to see if the problem is reproduced in the latest version.

Alternative Solution 2

Troubleshoot the requests made by the browser:

  1. Open a document that takes long to load in Web Author in Google Chrome.
  2. Open the Developer Tools (e.g. by pressing F12).
  3. Deselect the Disable cache" checkbox in the Network tab.
  4. Clear the requests.
  5. Reload the page.
  6. Right-click on a request and select Save all as HAR with content.
  7. Sort the requests by time (e.g. right-click, Sort, Time).
  8. Look for the longest requests, inspect the URL, and try to find if they are made because of a customization (custom plugin or framework).
  9. If nothing relevant is found, report the downloaded HAR to the Oxygen support team.

Alternative Solution 3

Troubleshoot the requests made by the server by enabling verbose HTTP(S) logs:

  1. Enable verbose HTTP logs by following the procedure from Enabling HTTP Request Logging for Debugging.
  2. Reproduce the problem.
  3. Open the server logs by following the procedure from How to Locate the Log File and the Log Configuration File​.
  4. See the logs and try to find the ones that take a long time on the server.
  5. If nothing relevant is found, report the found logs to the Oxygen support team.

Alternative Solution 4

Look for alarming server logs:

  1. Open the server logs by following the procedure from How to Locate the Log File and the Log Configuration File.
  2. Look for "Long request" and "Took long time to compute" and see the URL of the requests that take a long time on the server.
  3. If nothing relevant is found, report the found logs to the Oxygen support team.

Alternative Solution 5

Sometimes documents load slowly because of the time it takes to compute styles. This increases linearly with the size of the document and the size of the CSS rules. The CSS rules are mainly contributed by the framework. The styles are computed when loading both server-side and client-side.

To see how much time it takes the browser to render the page, follow these steps:

  1. Open the Developer Tools in Google Chrome (e.g. by pressing F12).
  2. Go to the Performance tab.
  3. Click on Record in the top-left corner.
  4. Reload the page.
  5. When the page fully loads, click Stop.
  6. Click the Main section within the Performance tab.
  7. In the bottom part, in the Summary tab, you should see a circle with the load time split between "Scripting", "Rendering", "Paint", "Idle", and "Other".
  8. Check that "Rendering" time is reasonable.
  9. If you want to reduce the client-side "Rendering" time:
    1. Make as many elements as possible collapsed by default by specifying the -oxy-foldable and -oxy-folded CSS rules:
      section {
        -oxy-foldable: true;
      }
      * {
        -oxy-folded: true;
      }
    2. Hide irrelevant elements with the display: none CSS rule.

Alternative Solution 6

Sometimes documents load slowly even if the main opened document is small, because it references many other documents that get expanded by either xi:include XML elements or DITA @conref or @conkeyref attributes.

For each referenced document that gets expanded, the application makes a request to an external server to retrieve the document content, thus the network speed and latency between the Web Author server and the server from where documents are retrieved is critical.

To troubleshoot this, enable network logs by following steps in Alternative Solution 3 and count how many requests are made when opening a document and how much time those requests took. After enabling network logs, you should see entries like this in the logs:
2024-10-01 16:12:31,209 DEBUG [ https-jsse-nio-8443-exec-1 ] org.apache.http.headers - http-outgoing-2 >> GET http://example-domain.oxygenxml.com/webdav/dita-topic.dita HTTP/1.1
2024-10-01 16:12:31,210 DEBUG [ https-jsse-nio-8443-exec-1 ] org.apache.http.headers - http-outgoing-2 >> Accept: application/xml,*/*
2024-10-01 16:12:31,210 DEBUG [ https-jsse-nio-8443-exec-1 ] org.apache.http.headers - http-outgoing-2 >> Accept-Encoding: gzip
2024-10-01 16:12:31,211 DEBUG [ https-jsse-nio-8443-exec-1 ] org.apache.http.headers - http-outgoing-2 >> Host: example-domain.oxygenxml.com
2024-10-01 16:12:31,211 DEBUG [ https-jsse-nio-8443-exec-1 ] org.apache.http.headers - http-outgoing-2 >> Proxy-Connection: Keep-Alive
2024-10-01 16:12:31,211 DEBUG [ https-jsse-nio-8443-exec-1 ] org.apache.http.headers - http-outgoing-2 >> User-Agent: Oxygen XML Editor/26.1
2024-10-01 16:12:31,211 DEBUG [ https-jsse-nio-8443-exec-1 ] org.apache.http.headers - http-outgoing-2 >> Authorization: ****
2024-10-01 16:12:31,223 DEBUG [ https-jsse-nio-8443-exec-1 ] org.apache.http.headers - http-outgoing-2 << HTTP/1.1 200 OK
2024-10-01 16:12:31,224 DEBUG [ https-jsse-nio-8443-exec-1 ] org.apache.http.headers - http-outgoing-2 << Date: Tue, 01 Oct 2024 13:12:31 GMT
2024-10-01 16:12:31,225 DEBUG [ https-jsse-nio-8443-exec-1 ] org.apache.http.headers - http-outgoing-2 << Accept-Ranges: bytes
2024-10-01 16:12:31,225 DEBUG [ https-jsse-nio-8443-exec-1 ] org.apache.http.headers - http-outgoing-2 << Content-Length: 4259
2024-10-01 16:12:31,226 DEBUG [ https-jsse-nio-8443-exec-1 ] org.apache.http.headers - http-outgoing-2 << Connection: keep-alive