Menu

#6 Resource usage improvements

open
nobody
None
5
2005-08-22
2005-08-22
Dan Mindler
No

The following modifications are suggested to improve
resource usage. We were running out of file descriptors
in our process and these changes helped our application:

1. com.swabunga.spell.engine.Configuration.java:

create only one default static final
PropertyConfiguration instance (as a singleton) and
return it when the className is null:

public static final Configuration
getConfiguration(String className)

2. com.swabunga.spell.engine.PropertyConfiguration.java:

In the constructor and save() methods, close the
streams appropriately. Since they weren't explicitly
closed, the file descriptors would stay in use until
the finalizer closed the streams.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.