https://github.com/miho/imagecachetest
Contains experimental classes for Swing (Java GUI Framework)
https://github.com/miho/imagecachetest
Last synced: 3 months ago
JSON representation
Contains experimental classes for Swing (Java GUI Framework)
- Host: GitHub
- URL: https://github.com/miho/imagecachetest
- Owner: miho
- Created: 2011-04-26T12:26:33.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2011-05-01T14:07:50.000Z (over 14 years ago)
- Last Synced: 2025-04-10T23:45:34.171Z (9 months ago)
- Homepage: www.mihosoft.eu
- Size: 109 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
Warning: this package contains experimental classes for testing purposes only!
Purpose: the question I want to answer is under which circumstances it is cheaper to reuse created objects instead of creating new ones. Therefore this package contains an object cache that uses constructor parameters to create a key value for a HashMap. This ensures that finding existing objects is cheap enougth. I tested object caching with BufferedImage instances.
Usage: to start the test, just run the main class of this packages.
Current results: my current test on OS X 10.6 (Core i5) show that the cached version runs about 2-4 times faster than running without cache. On the other hand cleaning the image after usage currently takes a lot of time. So, there is still room for improvements.