Skip to content
This repository was archived by the owner on Nov 14, 2025. It is now read-only.

Let's talk performance

Ondřej Michal edited this page Aug 19, 2022 · 4 revisions

Here we would like to address some questions and issues regarding performance that came up during the development. These informations are suitable for experienced developers and curious users.

We use SOAP package called SUDS to be able to communicate with RFEM. This was chosen for many good reasons. Believe that we saw the Zeep and SUDS is simply better for our usage. Now the SUDS makes connection with any request and terminates it immediately. That leeds to poor performance and the connection is apparent by RFEM 'flickering' going from locked(*) state to unlocked many times over.

Persistent connection

To shorten the response the first step is to create persistent conection. SUDS enable us to create such connection by using requests and suds_requests(**). Connection pool in HTTPAdapter is set to 1, then mounted to session and as RequestsTransport object passed to SUDS Client as transport parameter. This speeds up the proces 3 times. You can find this in RFEM\initModel.py.

Asynchronous execution

Now, you may be familiar with the concept of asynchronous execution and well known libraries asyncio and aiohttp. Those should enable to create async loop and send the requests to server as quickly as possible. All in one connection, using one thread, just (a)waiting the callbacks. The waiting for response from server is the one thing that slows the execution. Don't get us wrong, we tried to use it, but neither asyncio or async-suds (SUDS based on asyncio) wants to work here. To add to the trouble we think that it is not much usefull feature. Most of the executions are dependent on each other. RFEM can't create line if there is one point missing.

Anyway, if you know how to speedup the process, any suggestions are welcomed.

(*) The application is locked to avoid ambiguity during connection.

(**) Author: Jason Michalski, email: armooo@armooo.net

Clone this wiki locally