rhdunn / cainteoir-engine

The Cainteoir Text-to-Speech core engine
http://reecedunn.co.uk/cainteoir/
GNU General Public License v3.0
43 stars 8 forks source link

Lazily load the mimetype information #22

Closed rhdunn closed 11 years ago

rhdunn commented 12 years ago

At the moment, mimetype loading is done during the static initialization phase. This causes several problems:

  1. it is sensitive to the initialization order of the other static objects -- particularly the namespace objects and xml context lists;
  2. it is not needed for the xmlreader parser tests -- in fact it complicates these tests as it is using the xmlreader to parse the mime database.

Therefore, the mimetype information should be lazily loaded the first time it is actually needed.

rhdunn commented 12 years ago

The current mimetype database behaviour is causing issues for the 0.7 release when building through debuild (the languages tests are failing to load the mimetype database for the language localization tests).

rhdunn commented 12 years ago

Deferring this, as the languages tests problem was the XDG_DATA_DIRS variable not being set for that test.

rhdunn commented 11 years ago

Closing not implemented: may reconsider this in the future.