Improving SAO's performance and response time


(Richard V) #1

Dear Tryton’s Community,
I have been using Tryton 5.0 for almost 6 months now with the SAO client and as the users register more data such as parties, invoices, products, etc into the system I have noticed that browsing the data on any lists (a.k.a trees) have become very slow and impractical. For example opening the list of products and clicking on the “More” button at the bottom of the list to refresh the list with more items works quickly for about 40 to 60 items, but as it grows, it takes longer and longer time to refresh, to the point that the internet browser (Firefox 64.0) stops responding. I understand that the user should make use of the “search” bar and type the name of the item it wants to look for to reduce the number of items to display in the list. However in practice, people sometimes don’t know exactly what they are looking for and prefer to browse the entire list of products to find what they need. Hence the list grows to hundreds of items.

I wonder if there is a way I could improve the speed and performance of the SAO client on list loading? If this is an issue related to javascript’s speed limitation (nodejs), then I would like to know if there is a possibility that the user can choose to display the list in paged mode (i.e. always display 20 items at most, but you can advanced the next set of items by clicking on the next page), instead of the current “dynamic end-less, load-more-on-request” mode.

Sometimes, because of the long time that list is loading, the user does not know if this is due to a connection problem or it is normal loading time. I would like to know if some kind of indicator could be added to tell the user to wait. This may at least reduces the user’s anxiety and may help to reduce complains over the slow response time.

Any tips on a solution to this problem is very welcome.


(Cédric Krier) #2

Are you sure it is 5.0 because it was released only 3 months ago.

well it is pretty normal that this algorithm is linear O(n).

It depends on how much rows are displayed.

Indeed it is a mix of both that is implemented in the web client. The behavior is defined by Sao.config.limitand Sao.config.display_size.

There is one when the RPC calls are slow. But it may be good to add it also on redraw_async.


(Richard V) #3

Well, I started with 4.8 and then migrated to 5.0.

So you mean that every time I press the “More” button at the bottom of the list, the SAO client reloads all the items from the beginning again? I would expect it to load only the next set of items and append them to the existing list, so that O(n) is just O(20) for every click on the button. But it appears that “n” grows for the current implementation and for n > 200 the refresh gets very unresponsive on the browser.
I am going to dig in the code and see how the list is refreshed.


(Cédric Krier) #4

No it loads only what it does not. But it refresh all cells. I think this could probably be improved because for now it call display which is the general refresh but in the case of “More” only the new rows needs to be added and drawn.


(Cédric Krier) split this topic #5

A post was split to a new message: How to constribute


(Cédric Krier) #6

I made some analysis and I found that Issue 8199: Speedup display of tree view - Tryton issue tracker could be done to improve the refresh time of large list/tree.