Page 1 of 1

issue-#67 improvements for Obx->Primes...

Posted: Wed Jul 15, 2015 9:11 am
by Josef Templ
I have created issue-#67, which refers to CPC 1.7 rc5 change list number 32.
For the issue see http://redmine.blackboxframework.org/issues/67.

The proposal for this issue is fairly old and I was somehow involved in it but I don't remember the details.
After revisiting this issue now it seems to me that it is a bit off topic.
According to the docu of ObxActions, the purpose of ObxActions (prime number calculation)
is the demonstration of BB's ability for handling background tasks.
Therefore the speed does not really matter and the proposed "improvements"
kind of deviate from the original purpose of ObxActions.

So my current preference would be to ignore this issue and leave ObxActions unchanged.
@Helmut: do you remember more details about this issue?

- Josef

Re: issue-#67 improvements for Obx->Primes...

Posted: Thu Jul 16, 2015 4:43 am
by Zinn
Josef, I send you an e-mail with documantation I have found - Helmut

Re: issue-#67 improvements for Obx->Primes...

Posted: Thu Jul 16, 2015 8:36 am
by Josef Templ
OK, there was somebody who was confused because the primes are computed so slowly.
I have now modified my original approach a bit in order to better balance the amount of
work done per step. The user now defines the stepSize, not a speedup factor.
Depending on the stepSize, 0, 1, or more primes are computed per step.
This makes it much better visible that the computation of small primes takes less
time than the computation of larger primes. Previously there was no observable
difference due to the fact that in almost all cases exactly 1 prime has been computed per step.
The user can enlarge the stepSize and get a faster total response time.

I have also updated the docu.

For the diffs see http://redmine.blackboxframework.org/pr ... 3d1bc6e0a6.

- Josef