Django

Code

Ticket #7434 (closed: fixed)

Opened 6 months ago

Last modified 6 months ago

Add an option to disable GDAL

Reported by: rcoup Assigned to: jbronn
Milestone: Component: GIS
Version: gis Keywords: gdal settings disable
Cc: Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

libgdal connects to a massive number of other libraries which collectively use a tonne of RAM. This is further compounded in distribution releases of GDAL (eg. Debian & Ubuntu) since they tend to include nearly every option. Since it's imported by gis/models.py the RAM is consumed regardless of whether any GDAL features are later used.

Batteries included is good, so I wonder whether we can set a NO_GDAL option so people who want to disable it and understand the consequences can, as an optional setting or environment variable? Happy to write a patch, just want an opinion on options :)

Attachments

7434.0.diff (0.8 kB) - added by rcoup on 06/13/08 20:48:20.
Doc patch

Change History

06/13/08 16:57:48 changed by jbronn

  • needs_better_patch changed.
  • needs_tests changed.
  • needs_docs changed.

Have you tried setting GDAL_LIBRARY_PATH in your settings to a non-existent file? Afterwords, an import of GDAL stuff should fail, and thus HAS_GDAL would be false.

06/13/08 16:58:46 changed by jbronn

  • keywords set to gdal settings disable.
  • owner changed from nobody to jbronn.
  • version changed from SVN to gis.

06/13/08 20:48:20 changed by rcoup

  • attachment 7434.0.diff added.

Doc patch

06/13/08 20:49:57 changed by rcoup

Works fine :)

7434.0.diff is a patch to gdal/__init__.py adding a note about the GDAL_LIBRARY_PATH setting.

06/16/08 01:18:40 changed by Simon Greenhill

  • has_patch set to 1.
  • stage changed from Unreviewed to Ready for checkin.

06/16/08 11:52:58 changed by jbronn

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in r7665.


Add/Change #7434 (Add an option to disable GDAL)




Change Properties
Action