Issue 87022 - Why OOBasic is so slow compared to MS VisualBasic (300x)
Summary: Why OOBasic is so slow compared to MS VisualBasic (300x)
Status: ACCEPTED
Alias: None
Product: General
Classification: Code
Component: scripting (show other issues)
Version: OOo 2.3.1
Hardware: PC All
: P3 Trivial (vote)
Target Milestone: AOO Later
Assignee: AOO issues mailing list
QA Contact:
URL: http://www.oooforum.org/forum/viewtop...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-14 09:03 UTC by amdx4
Modified: 2017-05-20 11:35 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description amdx4 2008-03-14 09:03:03 UTC
[b]I tested on CPU Core 2 Quad Q6600 @ 3,2GHz[/b]
[u]
[code]
Sub Main
Dim x as Variant
Dim y as Variant
Dim i as Variant
x = 1
y = 1
    t! = Timer
    For i = 1 To 1000000000
        x = x * y
    Next
    Msgbox (Timer - t!)
End Sub
[/code]
[b]MS VB = 24,03 seconds
OO Basic = 3424 seconds[/b]

140 times more slow

[code]Sub Main
Dim x as Long
Dim y as Long
Dim i as Long
x = 1
y = 1
    t! = Timer
    For i = 1 To 1000000000
        x = x * y
    Next
    Msgbox (Timer - t!)
End Sub[/code][/u]
[b]MS VB = 11,42 seconds
OO Basic = 3427 seconds[/b]

300 times more slow

Who can explain this
Comment 1 ab 2008-03-14 09:23:25 UTC
This is a well known but difficult to fix problem as it's based on the general
architecture of OOo Basic that obviously hasn't been designed for good
performance. So to really fix this a complete redesign would be necessary.
This is difficult because of limited resources and because of the high risk
of breaking the compatibility somehow.

Anyway this of course is no P1 at all according to the priority rules.
-> P3, OOo later as this problem unfortunately has no real chance to be
addressed in the near future.
Comment 2 amdx4 2008-03-14 10:15:22 UTC
I have an ideea
At first to make the second interpretator SuperBasic - starting with little
functionality but very optimized for speed. Results to recive througth functions
from second command interpretator to the first.
By time the second command interpretator will be more functional enought
functional and at this time to use them as first
Comment 3 kpalagin 2008-03-15 15:58:26 UTC
Andreas,
as always we have a choice of slowly bleeding (300 times slower is actually 
dying) or having one-time surgery and then living happy life.
Making surgery will be more and more difficult as the number of developed 
applications and number of users grows.

I strongly suggest targeting this for 3.x just to have it in sight and in mind.

WBR,
KP.
Comment 4 ab 2008-03-17 12:36:44 UTC
ab->amdx4: Unfortunately I don't really understand your idea. You want to
mix different interpreters at runtime?! If yes, do you really expect this
could ever work? I don't. If no, I don't see which of the problems I've
mentioned above would be solved by this. Of course if a new system was de-
veloped this would be done besides the old first, but this is only develo-
pement tactics and no solution for the real problems.

ab->kpalagin: It's not as easy. Nobody can guarantee that the happy life
status will ever be reached. It could easily end up in endlessly fixing
compatibility problems. Believe me, it's hard enough to make minor chan-
ges to the parser - as I'm just trying at the moment - without breaking
anything. Rewriting the whole system including all the little bugs old 
programs now may depend on would be much worse.

Besides this it's also a question of priority. The effort for rewriting
the complete OOo Basic system would be huge. I guess, it could easily re-
quire 12 months or more. First, I simply don't have this time. Second I 
doubt that such an effort is justified for one single issue. The OOoBasic
performance is weak, but obviously it's not too weak for the most cases.
The real life does not consist out of benchmarks and nobody uses OOo Ba-
sic for number crunching. Usually it's used to handle dialog events and 
access the OOo API that often isn't too fast either. In most cases it 
does not matter if a Button handler needs 0.000001 or 0.001 seconds to 
be executed. In case a user really needs performance it will be better
anyway to create an extension, e.g. using Java.

So if we put it on 3.x it wouldn't change much as it surely would be
set to 4.x some day. Anyone who sees different priorities here is free
of course to start a SuperBasic project. Just don't expect me to do the
work then... :-)
Comment 5 Marcus 2017-05-20 11:35:19 UTC
Reset assigne to the default "issues@openoffice.apache.org".