python modul pre-import to avoid importing each time

Поиск
Список
Период
Сортировка
От Rémi Cura
Тема python modul pre-import to avoid importing each time
Дата
Msg-id CAJvUf_sv2DFCF2vzhCWk0uTFq7g7+uwmYUpzxrB5yGYiaAE1yw@mail.gmail.com
обсуждение исходный текст
Ответы Re: python modul pre-import to avoid importing each time
Список 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 по дате отправления:

Предыдущее
От: sunpeng
Дата:
Сообщение: Re: How to store fixed size images?
Следующее
От: Steve Crawford
Дата:
Сообщение: Re: Overlapping ranges