Issue 60795 - starbasic function cDate() from string 300 times slower than from numeric value
Summary: starbasic function cDate() from string 300 times slower than from numeric value
Status: CONFIRMED
Alias: None
Product: General
Classification: Code
Component: scripting (show other issues)
Version: OOo 2.0.1
Hardware: PC Windows, all
: P5 (lowest) Trivial (vote)
Target Milestone: AOO Later
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-19 03:34 UTC by joegyorkos
Modified: 2014-03-17 08:54 UTC (History)
2 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 joegyorkos 2006-01-19 03:34:36 UTC
cDate() takes inordinate amounts of time, and generates 100% cpu usage in
typical calls, eg.
dim v,v3,i, v2

v3	= GetSystemTicks
for	i = 1 to 200
	v = cDate("01/12/05")
	next
msgbox "slo " & (GetSystemTicks - v3)  ' slo  2900 ticks -- 3 seconds!!
v3	= GetSystemTicks
for	i = 1 to 200
	v = cdate(38687) 'fast -- this is expected speed
	next
msgbox "fast " & (GetSystemTicks - v3) '  15 ticks,  200x faster!!!!

Please, can this be fixed soon -- I desperately need it for processing date
columns for database access.  Thanks!
Comment 1 frank 2006-01-19 08:29:27 UTC
changed component
Comment 2 frank 2006-01-19 08:30:07 UTC
Hi Joerg,

please have a look at this one.

Frank
Comment 3 joerg.skottke 2006-03-31 09:10:50 UTC
to AB 
The first call really takes its time. Can we do anything about it?
Comment 4 ab 2006-05-23 14:49:38 UTC
STARTED
Comment 5 Rainer Bielefeld 2014-03-17 08:54:51 UTC
Still Reproducible with server installation of "AOO 4.1.0-Beta – German UI / German locale - [AOO410m14(Build:9760)  -  Rev. 1573601 2014-03-03 17:47:48]" on German WIN7 Home Premium (64bit)", own separate user profile. 

Attached Macro calculates slow down factor if d date is given as string instead of numeric value

It seems that situation might have been improved a little since 1.1.5,

My results in Message Box with Various Versions:

OOo 1.1.5:          < 900
OOo 2.0.2           < 800
OOo 3.1.1           < 500
OOo 3.3.0           < 300
AOO 3.4.1           < 400
AOO 4.1.0 Beta      < 300

But that might be illusion caused by "Bug 124445 - AOO Basic execution slow"?

Currently we even do not know whether the core of cDate() causes the slow down or whether cDate() internally calls a string to number function if data is contributed as string and that string to number function causes the problem; or hwatever.

I see only small priority for this one.

Assignation back to default due to facts.