Morfik 3.0.2 – server-side optimization

We are getting close to releasing an update to Morfik 3, and today I’d like to share with you some details about the work that has been done on improving the performance of websites created with Morfik. For this update we have focused on the server-side performance, here is a list of improvements that will be included in 3.0.2:

– General xApp performance. We have optimized some key classes in the framework, and examined the code that gets executed every time xApp is receiving a request to make sure there is as little processing being done as possible.

– The implementation of forms and reports rendering on the website has been reviewed. Loading the form from resources every time it has to be rendered can be an expensive operation especially for complex forms with many controls. We have been able to come up with a technique that eliminates this problem completely resulting in a significant speed improvement in this area.

– We have identified the problem with continuous forms where the underlying query could be executed more than once while rendering the form. This allowed us to improve the performance of continuous forms – the impact will be most noticeable when a complex query is being used as the source for the form.

– A request for the main website page is the most common, and it’s perhaps the one that is the most important when it comes to how the user perceives the site speed. To allow SEO to happen, xApp has to render the full page every time it is requested. The optimization we’ve done to other areas has already reduced the time it takes to render main page, but we have also done some improvements specific to the main page. In particular, the initial html code gets sent to the browser almost instantly so that the browser can start preparing the page and downloading the scripts and images while the SEO part of the page gets generated.

Our main website and forum are already compiled with the new build, so you can see the effect yourself. The browser changes the page title and displays the loading image almost immediately after you type in the url.

We have also done some load testing using Web Capacity Analysis Tool from Microsoft, and have found that xApps compiled with new version perform much better under heavy load. This is good news for us, since our website has to be prepared to handle millions of visitors storming our order page every day.

While we are excited with the optimization done in 3.0.2, this is by no means the end of it.

The improvement of the server-side will continue. We want to take the full advantage of the fact that xApps compiled with Morfik are native executables. There is really no limit to how efficient they can be!

We have also not forgotten about the other side of Morfik applications – the browser-side. We are working on reducing the html footprint of our controls, and reviewing the way xApp works inside the browser to increase the loading speed and also improve the responsiveness of the UI. This project is already under way, and you should see the results of it in some not so distant future.

Yet another area of improvement is the use of HTML 5. Since we have already done the hard part of making sure image effects and such work on every browser, we are in a good position to make use of all the exciting new features appearing in the modern browsers. As a result xApps will continue to work the same everywhere, but if we detect that some feature is natively supported by the browser we will use native implementation of it rather than the one from our framework. That should result in the best performance possible, and personally I can’t wait to see it happen.

Well, that’s it for today. If you have any comments or suggestions please share them.

6 Responses to “Morfik 3.0.2 – server-side optimization”

February 22nd, 2019
Bastiaan says:

Hi Sergey

I think than these new improvements will increase once more ,the confidence of Morfik users.

For sure Morfik is Our rigth choice, as development tool

Congratulations all Morfik team


Hyberson says:


I found “our website has to be prepared to handle millions of visitors storming our order page every day” great!

I hope it happens 🙂


Sergey Kostinsky Sergey Kostinsky says:


Thank you for your suggestion. As you have noticed, we have used Amazon S3 to host static files (both avatar images and attachments), and we are quite happy with the results.

Improving Morfik compiler so that any Morfik application could benefit from that approach without much effort is definitely something worth considering.

Sergey Kostinsky Sergey Kostinsky says:


While 3.0.2 should be pretty solid, it is still not the final release. There are few more things we need to get right before we are happy to call it a release.

Emin Borbor says:

Although it is not a direct server-side optimization, “Taking load off Morfik app server” as much as possible, will help it handle more related load.
What I mean by “related” is that Morfik app server should handle the dynamic parts generation and business logic and leave static content serving to other services.
If you add an option something like “base URL for resource run time deployment” in the project configuration and if the compiler and run time system obeys this directive during creation of img tags all statics like form/page image bundles etc. can be deployed on CDNs.

I have checked You are already serving member images from CDN servers. But it would be really nice to take all static content serving off Morfik app server.

Adam Brett says:

Will 3.0.2 be a “non Beta” release, or are we still officially in the beta phase?

Leave a Reply

Fields marked by an asterisk (*) are required.