dbStatic: only sort records alphabetically if explicitly configured (default: no sorting)

This commit is contained in:
Ralph Lange
2016-10-06 15:36:44 +02:00
parent 344928bdc6
commit 336bd656c8
2 changed files with 14 additions and 1 deletions

View File

@@ -15,6 +15,16 @@
<h2 align="center">Changes made on the 3.15 branch since 3.15.4</h2>
<!-- Insert new items immediately below here ... -->
<h3>dbStatic Library Cleanup</h3>
<p>Loading of database files has been optimized to avoid overproportionally
long loading times for large databases. As a part of this, the alphabetical
ordering of records instances (within a record type) has been dropped. In the
unexpected case that applications were relying on the alphabetic order, setting
<tt>dbRecordsAbcSorted = 1</tt> before loading the databases will retain the
old behavior.</p>
<h2 align="center">Changes from the 3.14 branch since 3.15.4</h2>
<!-- Insert inherited items immediately below here ... -->

View File

@@ -50,6 +50,9 @@ epicsExportAddress(int,dbBptNotMonotonic);
epicsShareDef int dbQuietMacroWarnings=0;
epicsExportAddress(int,dbQuietMacroWarnings);
epicsShareDef int dbRecordsAbcSorted=0;
epicsExportAddress(int,dbRecordsAbcSorted);
/*private routines */
static void yyerrorAbort(char *str);
static void allocTemp(void *pvoid);
@@ -298,7 +301,7 @@ static long dbReadCOM(DBBASE **ppdbbase,const char *filename, FILE *fp,
dbFinishEntry(pdbEntry);
}
cleanup:
{
if(dbRecordsAbcSorted) {
ELLNODE *cur;
for(cur = ellFirst(&pdbbase->recordTypeList); cur; cur=ellNext(cur))
{