-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Review performance #338
Comments
The user's job page performs 4 API calls with the following timing:
Total API calls time: 844ms Attempting to run the API calls in parallel didn't result in an appreciable performance change. I've run the Firefox profiler but no specific issue was detected. The component having the bigger impact was the However, I added the spinner and I think it improves the user experience when the page takes some time to load. |
Thanks!
Could you also report the total page-loading time? |
Page loading with last commit in jobs branch for me is around 1.2-1.3 seconds |
OK, thanks. Then there are about 400 ms spent in fractal-web, right? Question: can you already say whether this will improve when all jobs have correct properties (for context: the goal here is not to extra-optimize the loading of this specific page, but rather to get started with a broader discussion of where the next performance bottleneck will come from) |
We have to consider separately the time spent by Svelte backend and the time spent by frontend. Here a profiling of the backend: As you can see most of the time is spent waiting for a response (I forgot to consider also the Then the browser does some work too. Here is a profiling of the frontend: Most of the work of the JobList component is composed by JSON parse have a bigger impact on the backend than in the frontend, but I don't think that creating lighter payloads will be a huge improvement. I'm more in favor of introducing pagination, as I think it will become necessary at some point in the future when an instance will have a lot of old jobs in the database, but for me the biggest point here is reducing the number of calls. Could we consider to have a special endpoint for this? I can also do some more tests with parallel calls. |
I think we could also consider to remove the |
Thanks for the profiling!
Good to hear.
Agreed. This may not come up very soon, on the fractal-server side, but we'll need to explore it.
OK, let's see what we can do here. Comments based on our discussion 5 minutes ago:
Removing two API calls will have a significant impact, and that's all we need for the current scale (that is, number of jobs/projects/datasets/workflows). |
It would be great to see a similar profiling also for the other two pages
Maybe we'll just end up saying "that's fine for now", but at least we have a baseline for future improvement. |
Removing the 2 calls to workflows and datasets the jobs page takes 555 ms |
That's awesome, thanks a lot for this overview! And what an improvement with those 2 dropped calls! Also, +1 for testing user's projects & specific workflow pages. That would have caught the issue with the scaling with the square of elements we had a few weeks back and great if we get a baseline for current performance on some real-life data :) |
Closing in favor of #361 |
Just for-the-record, here are some rough timings for loading three pages based on the test DB we are using internally:
We should start some more systematic profiling. The first goal is to understand what is the overhead on top of the REST API calls. Depending on where most of the time is spent, we can come up with multiple improvements. A first brainstorming:
Slim
versions of the response models (in fractal-server), when endpoints return lists of objects that may be longThe text was updated successfully, but these errors were encountered: