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

Reduce number of unnecessary roundtrips to Glance #661

Open
mbuechse opened this issue Sep 26, 2023 · 1 comment
Open

Reduce number of unnecessary roundtrips to Glance #661

mbuechse opened this issue Sep 26, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@mbuechse
Copy link
Contributor

There are many unnecessary roundtrips in manage.py:

  • Each time an image is uploaded, the whole list of images is retrieved anew, instead of just adding the newly uploaded image to the list.
  • For the subsequent call of set_properties, the whole list of images is again retrieved, when the actual image object could be passed to the function instead of just the name. (Mind you that this is the only call to set_properties ever, so it could readily be changed!)
  • For each of the potential adjustments of the metadata (min disk, min ram, os hidden, as well as each and every property that is missing or has the wrong value), a dedicated call to update_image is performed, when the changes could (easily!) be aggregated and the image updated only once.
@mbuechse
Copy link
Contributor Author

The first item in my list came into existence with this commit: 47e0727#diff-382a7342c7615f4f749a89ded32a088038682637699dfc29a6994c7ab490d668R89-R90

@berendt berendt added the enhancement New feature or request label Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants