[Webfunds-users] Comment / Question

Ian Grigg iang@systemics.com
Wed Mar 29 08:12:42 2000


Craig Haynie wrote:

> 1) The WebFunds Wallet, running on my NT computer, does not release the CPU
> during Idle time, and this forces my processor to run at 100% capacity and
> gives the appearance of a sluggish behavior. There is an API call which can
> be made during the idle loop which will free up this time. Make the call
> "Sleep(1);" to the Windows API in the event loop and this processor time
> will be freed.

2nd attempt at answering this, I'll take it more slowly this
time (my Netscape crashed at the end of the last reply :()

This is a Java problem.  What JVM are you using?  AFAIK there
is no busy waiting or polling or anything like that in WebFunds
itself, although there is some within Java, and there may be
some in Swing (it's not possible to really identify what is
in Swing or not...).

On my machine(s) (FreeBSD), the CPU consumes a little to run
WebFunds, but it is under the 0.01% limit that is required to
get a number.  But it is consuming a tiny amount, because I
can see it sort to the top of top, as it were.

However, on starting up, SecureRandom kicks in and throttles
the CPU for about half a minute trying to generate some numbers.

iang


PS$ top

  PID USERNAME PRI NICE  SIZE    RES STATE    TIME   WCPU    CPU COMMAND
69438 iang       2   0  2512K  1868K select   0:04  9.28%  9.28% xterm
  654 iang      28   0 15992K 10100K RUN     31:56  0.20%  0.20% XF86_SVGA
  147 root      28   0   848K   240K RUN      2:47  0.05%  0.05% moused
 5889 iang       2   0 30084K 20136K select   4:58  0.00%  0.00% communicator-4
  640 iang       2   0 22596K   364K select   4:22  0.00%  0.00% ssh-agent
  662 iang       2   0  3368K  1916K select   2:28  0.00%  0.00% wmaker
69487 iang      18   0 28432K  9228K opause   0:41  0.00%  0.00% java_X