Opened 12 years ago

Closed 12 years ago

Last modified 8 years ago

#3134 closed defect (fixed)

Cleanup of drivers when using ECW data is very expensive

Reported by: aboudreault Owned by: Even Rouault
Priority: normal Milestone: 1.6.3
Component: GDAL_Raster Version: 1.6.2
Severity: normal Keywords: ecw
Cc: jlacroix

Description

By using the library (with MapServer?) or using gdalinfo directly with ECW data, we can see that the call to GDALDestroyDriverManager() is very expensive. This call takes ~3 seconds. I've tested GDAL 1.5.4, 1.6.0 and 1.6.2 and using libecw 3.3.2. You can reproduce the bug with:

gdalinfo myfile.ecw

And if you do a strace of that command, you'll see that there is a kind of loop somewhere:

gettimeofday({1252518493, 471961}, NULL) = 0
nanosleep({0, 1000000}, NULL)           = 0
sched_yield()                           = 0
gettimeofday({1252518493, 473060}, NULL) = 0
gettimeofday({1252518493, 473090}, NULL) = 0
sched_yield()                           = 0
gettimeofday({1252518493, 473139}, NULL) = 0
nanosleep({0, 1000000}, NULL)           = 0
sched_yield()                           = 0
gettimeofday({1252518493, 474242}, NULL) = 0
and so on ....

Change History (4)

comment:1 Changed 12 years ago by Even Rouault

Owner: changed from warmerdam to Even Rouault

comment:2 Changed 12 years ago by warmerdam

Component: defaultGDAL_Raster
Keywords: ecw added

comment:3 Changed 12 years ago by Even Rouault

Milestone: 1.6.3
Resolution: fixed
Status: newclosed

r17627 /trunk/gdal/frmts/ecw/ecwdataset.cpp: Comment out cleanup in GDALDeregister_ECW() that can take up to 3 seconds

r17628 /branches/1.6/gdal/frmts/ecw/ecwdataset.cpp: Comment out cleanup in GDALDeregister_ECW() that can take up to 3 seconds

If someone knows how to report bugs to ERDAS, it might be appropriate to try to make them fix NCSecwShutdown().

comment:4 Changed 8 years ago by Even Rouault

r25865 "ECW: re-enable NCSecwShutdown() for SDK 5 on Linux since it seems to work again"

Note: See TracTickets for help on using tickets.