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

Improvement of the ImageLayer class #284

Open
lesquoyb opened this issue Aug 21, 2024 · 0 comments
Open

Improvement of the ImageLayer class #284

lesquoyb opened this issue Aug 21, 2024 · 0 comments
Labels
About Development This issue concerns the development of GAMA 📺 Display Java2D This issue or request concerns only Java2D displays 🖥 Display OpenGL This issue or request concerns only OpenGL displays 🤗 Enhancement This is a request for enhancement

Comments

@lesquoyb
Copy link
Contributor

Is your request related to a problem? Please describe.
Following the PR #263, here are some pointers for improving the ImageLayer class:

  1. This class uses a cached ImageProvider, but as the layer is only refreshed when the refresh facet is true, and that is checked in different parts of the code, I wonder what's the point of this object ? Maybe for files ? If none then it should be removed
  2. The BufferedImage to be drawn is actually generated in the buildImage method, but it is not returned, instead the ImageProvider that did generate it is returned and is then drawn with the drawAsset method. I think that this method is generating another bufferedimage but I'm not sure and it may depend on many factors (nature of the provider, facets of the layer/display etc.). I did a test it with a matrix that changed every cycle and compared the average cycle time with current method and with one were we return the buffered image and draw it with the method drawImage instead: I noticed a slight improvement (around 10%) in the average cycle execution time but it may as well be normal variability in simulations and I didn't dig much more.
@lesquoyb lesquoyb added 🤗 Enhancement This is a request for enhancement About Development This issue concerns the development of GAMA labels Aug 21, 2024
@AlexisDrogoul AlexisDrogoul added 📺 Display Java2D This issue or request concerns only Java2D displays 🖥 Display OpenGL This issue or request concerns only OpenGL displays labels Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
About Development This issue concerns the development of GAMA 📺 Display Java2D This issue or request concerns only Java2D displays 🖥 Display OpenGL This issue or request concerns only OpenGL displays 🤗 Enhancement This is a request for enhancement
Projects
None yet
Development

No branches or pull requests

2 participants