Change FIXMEs relating to caching decal bytes to a TODO. The class
functions correctly as is, but might benifit from caching.
This commit is contained in:
parent
474797748d
commit
1e51b171a4
@ -25,7 +25,7 @@ public class DecalRegistry {
|
|||||||
|
|
||||||
private Map<String,File> exportedDecalMap = new HashMap<String,File>();
|
private Map<String,File> exportedDecalMap = new HashMap<String,File>();
|
||||||
|
|
||||||
/* FIXME - Caching ?
|
/* TODO - should we implement caching?
|
||||||
private Map<String,byte[]> cache = new HashMap<String,byte[]>();
|
private Map<String,byte[]> cache = new HashMap<String,byte[]>();
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -71,7 +71,8 @@ public class DecalRegistry {
|
|||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
public InputStream getDecal( String name ) throws FileNotFoundException, IOException {
|
public InputStream getDecal( String name ) throws FileNotFoundException, IOException {
|
||||||
/* FIXME - Caching?
|
/* TODO
|
||||||
|
// if the decal has already been cached return it.
|
||||||
byte[] bytes = cache.get(name);
|
byte[] bytes = cache.get(name);
|
||||||
if ( bytes != null ) {
|
if ( bytes != null ) {
|
||||||
return new ByteArrayInputStream(bytes);
|
return new ByteArrayInputStream(bytes);
|
||||||
@ -122,7 +123,7 @@ public class DecalRegistry {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
byte[] bytes = FileUtils.readBytes(rawIs);
|
byte[] bytes = FileUtils.readBytes(rawIs);
|
||||||
// FIXME - update cache;
|
// TODO - here we would update the cache.
|
||||||
return new ByteArrayInputStream(bytes);
|
return new ByteArrayInputStream(bytes);
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user