lenra-io / server

GNU Affero General Public License v3.0
6 stars 0 forks source link

[Bug]: Performance problem on the server/devtool. #574

Open jonas-martinez opened 7 months ago

jonas-martinez commented 7 months ago

What happened?

It seems that when running a lot of requests to the server api on a lenra application, in my case a couple thousand requests, the server starts rebuilding the UI at each request and it also seems that either it reloads the UI MUCH more than at each request but more like 100 times per request or either the logging system is duplicating the logs.

In fact, my log file is 1.5 million lines long for the mere couple thousand requests, it seems quite high for that.

To reproduce this weird behavior, you can run the https://github.com/jonas-martinez/achiever app and enter your steamid + the appid that you can find in the technical.md file.

I can't upload the log file as it is literally 1 Gigabyte. I'm uploading the first thousand lines.

What browsers are you seeing the problem on?

No response

Version

No response

Relevant log output

log.txt

No response

taorepoara commented 5 months ago

@jonas-martinez Is this resolved by the insertMany ?

jonas-martinez commented 5 months ago

@taorepoara I will need to test this on my application (Achiever). I expect to do it very soon.

jonas-martinez commented 5 months ago

@taorepoara This problem is still here even with the insertMany and pagination system.

I don't know why but when I run my requests for getting my steam games and achievements, even though my UI is not supposed to be reloaded, the server tries to do it (and does not send the result on the websocket). So I think that there is a problem somewhere in the UI rebuild system that triggers everytime any entry in the Mongo database is updated/created.

You can see this behaviour in the log file attached to the description of this issue.