slow to add devices

Santiago3 years ago

I am using version 4.5 and I have a slowness of 18 seconds when adding devices.
the scenario is the following: I have an administrator user with 1000 assigned devices, when adding a device I have the delay.
If I do the same action with an administrator user with few devices, I don't have any delay.

I did a small debug and the delay occurs when executing

cacheManager.invalidatePermission(true, User.class, getUserId(), baseClass, entity.getId());
connectionManager.invalidatePermission(true, User.class, getUserId(), baseClass, entity.getId());

Does anyone have an idea on how to mitigate this problem?

Santiago3 years ago

sorry I meant version 5.5

Anton Tananaev3 years ago

Don't assign so many devices to a single user?

Santiago3 years ago

This is the admin user, he needs to see all devices for supervision.
I understand the reference of not putting so many devices on the same user, but according to his experience, there is a way to solve this or else. Could you explain to me why it happens?

Anton Tananaev3 years ago

It probably causes cache invalidation for all devices, so it's slow.

Tracker2 years ago

Hi, I have the same problem. Is there any solution or way to speed up the upload for administrator user?

Anton Tananaev2 years ago

The solution is to unlink devices that you don't need.

Himanshu2 years ago

I am also facing similar issue. Is there any solution for this?

Anton Tananaev2 years ago

We have updated cache invalidation, so this issue should be resolved now.

Santiago2 years ago

This is awesome, you can see a little bit of the changes made on github, I promise to apply them tomorrow and build to see the results, I'll keep you posted

Anton Tananaev2 years ago

You can try it on the preview version:

https://www.traccar.org/preview/