Skip to content
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

[24.0] Workflow Comment Indexing #17700

Conversation

ElectronicBlueberry
Copy link
Member

usegalaxy.org has performance issues with workflows which contain Comments.
After having a closer look at the database model, @davelopez and I suspect this could be due to missing indexes.

This PR adds those indexes.

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@ElectronicBlueberry ElectronicBlueberry added this to the 24.0 milestone Mar 13, 2024
@github-actions github-actions bot added the area/database Galaxy's database or data access layer label Mar 13, 2024
@mvdbeek
Copy link
Member

mvdbeek commented Mar 13, 2024

Adding the index makes sense, but can you say more about the performance issues ? Is that in the editor or the list index ? Which endpoint are you seeing this with ? Outside of the editor and workflow export I would hope we don't need to join against the comment model.

@mvdbeek
Copy link
Member

mvdbeek commented Mar 13, 2024

Weren't comments part of 23.2 as well ? In which case you want to target 23.2

@ElectronicBlueberry
Copy link
Member Author

Adding the index makes sense, but can you say more about the performance issues ? Is that in the editor or the list index ? Which endpoint are you seeing this with ? Outside of the editor and workflow export I would hope we don't need to join against the comment model.

This is on the editor, specifically the load workflow endpoint

@mvdbeek
Copy link
Member

mvdbeek commented Mar 13, 2024

Weren't comments part of 23.2 as well ? In which case you want to target 23.2

I take that back, it's a little unexpected that we'll have a migration against an existing release, I think 24.0 is fine for now as that's not yet out and I think it's not super-critical that the editor load is slow (how slow are we talking btw ?)

@ElectronicBlueberry
Copy link
Member Author

I take that back, it's a little unexpected that we'll have a migration against an existing release, I think 24.0 is fine for now as that's not yet out and I think it's not super-critical that the editor load is slow (how slow are we talking btw ?)

about 10-20 seconds

@mvdbeek
Copy link
Member

mvdbeek commented Mar 13, 2024

Can you share a workflow ?

@davelopez
Copy link
Contributor

@martenson
Copy link
Member

You can try this one: https://usegalaxy.org/published/workflow?id=174d3de4589911fa

ups, that one is 30s for me

@jdavcs
Copy link
Member

jdavcs commented Mar 14, 2024

We need to add an index as a database migration as a separate commit (see #15733 for an example)

@martenson
Copy link
Member

@jdavcs do you mean we need one migration commit and one index addition commit per index?

@jdavcs
Copy link
Member

jdavcs commented Mar 14, 2024

we can add multiple indexes in one migration. But, ideally, we need one db migration per commit (i.e. a commit containing a new db revision script).
The index should be added to the model and, explicitly, to the database. The edit in model/__init__.py makes the model change, the revision script changes the database.

@ElectronicBlueberry
Copy link
Member Author

That is what the second commit in this PR does

@jdavcs
Copy link
Member

jdavcs commented Mar 14, 2024

That is what the second commit in this PR does

which, obviously, I missed!

Copy link
Member

@jdavcs jdavcs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, sorry for missing the second commit! 😄

@mvdbeek mvdbeek merged commit 845e306 into galaxyproject:release_24.0 Mar 15, 2024
46 of 49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/database Galaxy's database or data access layer kind/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants