Skip to content

Make all accesses implement ArrayDataAccess#20

Merged
Rylern merged 3 commits into
mainfrom
array-accesses
Apr 20, 2026
Merged

Make all accesses implement ArrayDataAccess#20
Rylern merged 3 commits into
mainfrom
array-accesses

Conversation

@Rylern

@Rylern Rylern commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Change all DataAccess by making them implement ArrayDataAccess.

Before this PR, when a tile of an image was accessed for the first time, the corresponding BufferedImage (or Raster) was saved, and getting a pixel of this tile was fetching the pixel from the BufferedImage / Raster.

With this PR, when a tile of an image is accessed for the first time, an array is created and populated by all pixels of the corresponding BufferedImage / Raster. Getting a pixel of this tile is now simply an array access.

In terms of performance, with this PR, the first access to a pixel belonging to a tile is slower, but all subsequent access to pixels of the same tile are faster.

@Rylern Rylern merged commit dc925ac into main Apr 20, 2026
1 check failed
@Rylern Rylern deleted the array-accesses branch April 20, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant