• / company
    • about us
      • / about us

        The partner of choice for data & product engineering to drive business growth & deliver an impact within your organization
    • product engineering
      • / product engineering
        We specialize in Software Product Engineering, transforming your concepts into impactful products.
    • technology
      • / technology
        250+ specialists skilled in software, BI, integration, offering end-to-end services from research to ongoing maintenance.
    • methodology
      • / methodology
        We specialize in software product engineering, transforming your concepts into impactful products.
    • careers
      • / careers
        Our team needs one more awesome person, like you. Let’s grow together! Why not give it a try?
    • do good
      • / do good
        We’re a team devoted to making the world better with small acts. We get involved and always stand for kindness.
    • events
      • / events
        LLMs in Action: Transforming How We Work, Communicate, and Innovate
    • blog
      • / blog
        Why Every Developer Should Care About AI Plugins, And What You Might Be Missing
        mindit chats with Andreea Moldovan: “At mindit.io people really put effort into making it happen.”
    • contact us
      • / contact us
        We would love to hear from you! We have offices and teams in Romania and Switzerland. How can we make your business thrive?
  • / get in touch

Application performance

Working on applications with a lot of data and thousands of users it means that we always need to be with an eye on performance. We often hear questions like “Why this save takes so long?” or “Why your request is faster than mine” and so on. So we put together a list of tips& tricks / best practices that will always help you keep your performance under control.
1. sendStringParametersAsUnicode

The default value for this property is true, which means that String parameters are send to the database in Unicode format (for example it will send VARCHAR parameter in NVARCHAR, so there will be an extra/implicit conversion).If we set this value to false, the String parameters will be sent to the database in non-Unicode format. Below we have an example of a query run with the parameter set to true and then the same query with the parameter set to false.
sendStringParameterAsUnicode=true
sendStringParameterAsUnicode=false


2. Caching

Caching helps to avoid reading the same data multiple times, so the time used for that reading will decrease considerably, especially if we have a lot of data. But it is important to apply this concept to data that does not change very often, because otherwise the new changes on those data will not be taken into account, the old version being saved in the cache.
Without caching
With caching

For 44k rows, we can see that the time has decreased from 21 seconds to 23 milliseconds using caching, so this is an important instrument in controlling the performance of an application.


3. Moving logic from Java to SQL

Implementing business logic in SQL is probably not the first thought that comes to mind for a developer. Many are accustomed to keeping the database just to store information and all the logic to be done in Java. But there are situations where a logic written in SQL saves more time, the database being very efficient in working with a lot of heavy data. The best way we can do this is through stored procedures called from Java or through native queries.
Logic in Java
Logic in SQL4.


4. Asynchronous methods

Asynchronous methods help a lot in reducing execution time, but must be used intelligently, not in situations where these methods update the data used immediately in the application. For example, we may use asynchronous methods when we want to send notifications/emails to users to let them know that their data processing is complete. Sending the email may take some time, so there is no need for the application to wait for the email to be sent to display the end of the operation in the UI.

This also helps if the asynchronous method fails, so that the user does not feel this in the application and can continue to work
Without async method
With async method

Here are some simple examples of how we can improve the performance of an application, things we may or may not have thought about, but which, with a few changes, help keep a large application under control.

Distribute:

/turn your vision into reality

The best way to start a long-term collaboration is with a Pilot project. Let’s talk.