- Problem solved again

From: [at]} <Alexander>
Date: Wed, 6 Sep 2006 13:23:46 +0700

----boundary-LibPST-iamunique-142750431_-_-
Content-type: text/plain

Hello, Marc!

>> So the solution from my side would to be call f.Input less
>> frequently, but then again I don't think f.Input should
>> be operating so inefficiently...

  A Sleep is inserted there on purpose to fix another problem of
  BlackBox: 100% CPU load while selecting a text (or in any other busy
  loop with call to Frame.Input - there are quite a lot of them).
  Yes, Frame.Input souldn't be so inefficient. But then there should
  be no busy loops with it. It's just a framework design flaw that's
  not easy to fix. (Not with my BB knowledge.)

MM> Okay, now I've rewritten my code so that f.Input will not
MM> be called more then 3 times per second. Now Alexander's
MM> new fix doesn't slow my program down a noticeable amount.


MM> So, previously, f.Input could be called a thousand times
MM> per second and not slow the program down. Now, it cannot.
MM> No big deal -- I certainly do not need it to be called
MM> that frequently!

   Exactly!


   Another way to fix the problem is to insert that call to
   Services.actionHook.Step and Sleep into every busy loop with
   Frame.Input, but that would be quite an ugly patch, requiring
   recompilation of most of the BB framework. I've done that for
   myself, and it worked. It's just not the Right Thing to do.
   I think, the framework should be redesigned a little, but I'm
   not so familiar with it yet to perform such a change.

   By the way, I don't want to take credit for someone else's idea.
   The patch to Services and HostPorts.Rider.Input is done by Marco
   Ciot ("mc" in the source comments).

---=====---
 Alexander

--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy



----boundary-LibPST-iamunique-142750431_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRib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Zh
bWlsaWFyIHdpdGggaXQgeWV0IHRvIHBlcmZvcm0gc3VjaCBhIGNoYW5nZS5ccGFyDQpccGFyDQog
ICBCeSB0aGUgd2F5LCBJIGRvbid0IHdhbnQgdG8gdGFrZSBjcmVkaXQgZm9yIHNvbWVvbmUgZWxz
ZSdzIGlkZWEuXHBhcg0KICAgVGhlIHBhdGNoIHRvIFNlcnZpY2VzIGFuZCBIb3N0UG9ydHMuUmlk
ZXIuSW5wdXQgaXMgZG9uZSBieSBNYXJjb1xwYXINCiAgIENpb3QgKCJtYyIgaW4gdGhlIHNvdXJj
ZSBjb21tZW50cykuXHBhcg0KXHBhcg0KLS0tPT09PT0tLS1ccGFyDQogQWxleGFuZGVyXHBhcg0K
XHBhcg0KLS0tIEJsYWNrQm94XHBhcg0KLS0tIHNlbmQgc3ViamVjdCBIRUxQIG9yIFVOU1VCU0NS
SUJFIHRvIGJsYWNrYm94QG9iZXJvbi5jaFxwYXINClxwYXINCn0=


----boundary-LibPST-iamunique-142750431_-_---
Received on Wed Sep 06 2006 - 08:23:46 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:27:48 UTC