Slowness in OpenCMIS client

Leave a comment

April 14, 2013 by huionn

For many months, I feel that my client application is SLOW when login (> 5secs to show the workspace). Based on my intuition and common sense, the slowness should be due to communication with server (http and cmis). With some simple logging, it proves that the slow parts involve communication with server.

So, I assumed that the problem lies in server and tried to pinpoint the problem with curl requests. However, it shows that the Nuxeo server is reasonably fast with curl requests. Therefore I am clueless for the slowness. As the performance issue does not seem to be critical and I have many other things to do, I did not spend much time to troubleshoot it.

As my application is approaching product stage now, I decide to take time to improve the performance. With proper profiling (for both server and client), the finding is surprising (“assumption is the mother of all screw-ups”)

image

The problem lies in the opencmis client code AtomPubParser.parseWorkspaceElement(). It consumes almost all CPU for a few seconds and hence slows down the server execution (I host my app sever locally for development). (As side note, the code is slow in first execution after application starts but fast after that.)

I also find that OpenCMIS 0.9.0-SNAPSHOT has fixed the issue. The latest code is much faster (< 300ms). My application now is acceptably fast now : )

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: