Opened 11 years ago

Closed 8 years ago

#177 closed defect (wontfix)

Dictionary I/O under Windows is slow

Reported by: Norm Olsen Owned by: Norm Olsen
Priority: minor Milestone:
Component: Dictionaries Version:
Keywords: Cc:

Description

Dictionary I/O, especially dictionary scans required for WKT processing is rather slow under Windows using Microsoft CRT. (Not an issue under Linux.) A directory scan, as performed by CSllCsFromDt for example, is about 10 times slower than when performed using STDIO directly. Tests using a 500 scan benchmark show the following timing in seconds:

OS/CompilerIoUtilSTDIO
Win7:200822.1092.984
Win7:201021.9852.781
Win7:201222.9062.797
CentOS:gcc4.4401.120

Not sure how this affects performance in other areas.

This is not a significant performance issue during normal operation where dictionary scans are unusual. However, in test modules where the entire dictionary is converted to WKT, the execution time becomes hours when it used to be 2 or 3 minutes.

Unless corrected, avoid the WKT and EPSG tests built into csTestCpp (tests I thru N) on Windows. For an undetermined reason, running a complete csTestCpp becomes an overnight chore when compiled and linked with VC++ 2012.

Attachments (1)

Trac177TimingCode.cpp (1.8 KB ) - added by Norm Olsen 11 years ago.
COde used to acquire the timing data.

Download all attachments as: .zip

Change History (4)

by Norm Olsen, 11 years ago

Attachment: Trac177TimingCode.cpp added

COde used to acquire the timing data.

comment:1 by Norm Olsen, 11 years ago

Added source code of the timing mechanism used to produce the timings recorded above.

comment:2 by Norm Olsen, 10 years ago

Owner: changed from hugueswski to Norm Olsen

comment:3 by Norm Olsen, 8 years ago

Resolution: wontfix
Status: newclosed

This report is valid, but for Windows only. The culprit has been isolated to the CS_fseek call on line 347 of the csIoUtil.hpp module (references are as of revision 2753). This function call, when inside the CS_DefinitionRead template at its current position, has been observed to consume from 6, up to 100, times more CPU time than the remainder of the function. During investigation of this issue, the CS_fseek call was moved from the referenced template and placed immediately prior to the CS_csrd function call at line 631 in CS_csprm.c. This produced normal performance; i.e. six to 100 times faster. I haven't a clue as to what could be causing this issue.

As this performance issue is evident (currently) only in a testing environment, and since there is no problem when compiled and run under Linux/UNIX, the code is left as is for now. If anyone has a possible explanation for the above described behavior, this Trac Ticket will be revisited. For now, it is closed as a "WontFix" issue as the desired synchronization may be critical in some applications/environments.

Note: See TracTickets for help on using tickets.