Login and logout latancy in native mobile

0
Hi All,  We are deployed our application to acceptance and while perfoming load test on the native mobile app we are facing the following issues.    Key Concerns : 1. Login latency of approximately 11 seconds 2. Logout latency of around 6–7 seconds 3. Get session data API call latency of roughly 3 seconds   Actions Attempted: 1. Changing the sync mode to “Nothing – Clear Data” 2. Removing the After Startup flow during application startup Please advise on resolving the mentioned issues. Thanks in Advance. 
asked
1 answers
0

hi,


Slow login/logout and session API latency in a Mendix native mobile app under load is common and usually not a single bug — it’s caused by the way the native client initializes and synchronizes data.

Why this happens

  1. Login latency (~11s)
  2. When a native app logs in, it does more than just authenticate — it initializes the client, checks security and sync settings, and often performs an initial sync of data. Initial synchronization and access rule evaluation add noticeable delay in mobile apps.
  3. Logout latency (~6–7s)
  4. Logout involves invalidating the session and cleaning up client state. This can take time under load, especially if there are many synchronized entities.
  5. Session data API (~3s)
  6. Fetching session and user data also invokes access rules and security evaluation, which is heavier under load and for complex role/access configurations.

What actually improves performance

Reduce synchronization scope

Only sync what’s truly needed at startup. Full synchronization (even with “Clear Data”) still runs expensive checks. Use filtered sync or sync on demand instead.

Simplify security/access rules

Each login and session call must evaluate access rules. Reducing rule complexity and the number of roles decreases evaluation time.

Keep initial screens light

Avoid heavy data loads or nanoflows on the first screen — load minimal UI first and sync/refresh after login navigation.

Profile and log startup

Enable Client_Startup and Client_Synchronization logs to see where time is spent and tune accordingly.

TL;DR

Mobile login/logouts feel slow because the native client must initialize, evaluate access rules, and sync data before rendering. There’s no single switch to fix it — instead, reduce synchronized data, simplify access rules, and optimize your startup flow for performance.

answered