H
HK
Every once in a while I find myself
writing static initializers for 'static final'
values. The initializers are non trivial, i.e.
they might even contain small loops.
Obviously this adds to the startup time of
a program.
Another solution would be getters
which compute the value on first use and
cache the result.
I am not worried really about the
startup time. It is rather that so many
things are done before the application's
main() even starts, some of them completely
unnecessary if the program does not
use a feature.
Any thoughts on this?
Harald.
writing static initializers for 'static final'
values. The initializers are non trivial, i.e.
they might even contain small loops.
Obviously this adds to the startup time of
a program.
Another solution would be getters
which compute the value on first use and
cache the result.
I am not worried really about the
startup time. It is rather that so many
things are done before the application's
main() even starts, some of them completely
unnecessary if the program does not
use a feature.
Any thoughts on this?
Harald.