Java preferences API throughput
Posted
by Domchi
on Stack Overflow
See other posts from Stack Overflow
or by Domchi
Published on 2010-06-17T12:37:49Z
Indexed on
2010/06/17
12:43 UTC
Read the original article
Hit count: 277
I'm using Java Preferences API to store window position and size of Swing application. At this moment, I'm listening to window resize/reposition events and storing the position and size every time they change. However, that means that if user slowly resizes window which is 200px wide to 400px wide, I'll probably write new window size about 200 times during pretty short time.
Preferences API uses whichever datastore is available on the host system (windows registry for Windows etc.) - but the question is, what are limitations or best practices for properties API? Is it OK, or would it be smart to write only when user has finished resizing? Anyone had experiences with Properties API on different platforms?
© Stack Overflow or respective owner