python modul pre-import to avoid importing each time - Mailing list pgsql-general

From Rémi Cura
Subject python modul pre-import to avoid importing each time
Date
Msg-id CAJvUf_sv2DFCF2vzhCWk0uTFq7g7+uwmYUpzxrB5yGYiaAE1yw@mail.gmail.com
Whole thread Raw
Responses Re: python modul pre-import to avoid importing each time
List pgsql-general
Hey List,

I use plpython with postgis and 2 python modules (numpy and shapely).
Sadly importing such module in the plpython function is very slow (several hundreds of milliseconds).

I also don't know if this overhead is applied each time the function is called in the same session.

Is there a way to pre-import those modules once and for all,
such that the python function are accelerated?

Thanks,

Cheers,
Rémi-C

pgsql-general by date:

Previous
From: sunpeng
Date:
Subject: Re: How to store fixed size images?
Next
From: Steve Crawford
Date:
Subject: Re: Overlapping ranges