python modul pre-import to avoid importing each time

Поиск
Список
Период
Сортировка
От Rémi Cura
Тема python modul pre-import to avoid importing each time
Дата
Msg-id CAJvUf_ssimnOdJ39sianv76Lz6aep+jbgVB7T0b4W1ypbsc_SA@mail.gmail.com
обсуждение исходный текст
Список pgsql-hackers
Hey List,
this is a repost from the general list where it get no responses (5 days)

I use plpython with postgis and 2 python modules (numpy and shapely).
Sadly importing such module in the plpython function is very slow (about half a second).

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 (at server start up for example),
such that the python function are accelerated?

Thanks,

Cheers,
Rémi-C

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Soroosh Sardari
Дата:
Сообщение: Re: Add a filed to PageHeaderData
Следующее
От: Etsuro Fujita
Дата:
Сообщение: Re: inherit support for foreign tables