[Cod-bugs] Slow queries through OPTIMADE API

Andrius Merkys andrius.merkys at gmail.com
Fri Dec 3 11:20:44 EET 2021


Hi Oier,

On 2021-12-02 17:05, Oier Arcelus wrote:
> However now I am finding that COD takes very long to generate a response
> from the queries I am making. I posted the doubts in
> https://matsci.org/t/connection-to-cod-optimade-api-is-very-slow/39556/11 <https://matsci.org/t/connection-to-cod-optimade-api-is-very-slow/39556/11>
> and there was some discussion, but finally the suggestion was to contact
> this email directly. Basically, the doubt is if including
> response_fields that require returning the ‘P1’-d cell take longer to
> generate. I did some small tests with different queries that I re-post
> here in case.

You are right to think that requiring P1 cells causes the delays. In the
(T)COD currently we do not cache the restored P1 cells, thus they are
reconstructed on-the-fly. Dropping 'cartesian_site_positions', 'species'
and 'species_at_sites' from 'response_fields' will definitely speed up
your queries. Thus if you do not need these properties, please exclude
from from 'response_fields'.

As for the execution times you cite, I can only speculate that first 10
structures with Li are not too complicated, but whenever you ask for
both Li and Co, among the first 10 hits you get a couple of larger
structures with more atoms. Therefore the response times increase
considerably.

Hope this helps,
Andrius

-- 
Andrius Merkys
Vilnius University Institute of Biotechnology, Saulėtekio al. 7
LT-10257 Vilnius, Lithuania

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the Cod-bugs mailing list