Apache OpenOffice (AOO) Bugzilla – Issue 60795
starbasic function cDate() from string 300 times slower than from numeric value
Last modified: 2014-03-17 08:54:51 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!
changed component
Hi Joerg, please have a look at this one. Frank
to AB The first call really takes its time. Can we do anything about it?
STARTED
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.