Ok, yes indeed including more elements makes the query slower. I have made some extra tests (sorry for long post)
Queries with response_fields
and nelements
https://www.crystallography.net/cod/optimade/v1/structures?filter=(elements%20HAS%20%20ALL%20"Li")%20AND%20(nelements=3)&response_fields=lattice_vectors,cartesian_site_positions,species,species_at_sites (3,8 sec)
http://www.crystallography.net/cod/optimade/v1/structures?filter=(elements%20HAS%20%20ALL%20"Li",%20"Co")%20AND%20(nelements=3)&response_fields=lattice_vectors,cartesian_site_positions,species,species_at_sites (1min)
http://www.crystallography.net/cod/optimade/v1/structures?filter=(elements%20HAS%20%20ALL%20"Li",%20"Co",%20"O")%20AND%20(nelements=3)&response_fields=lattice_vectors,cartesian_site_positions,species,species_at_sites (1min5sec)
Queries with only response_fields
http://www.crystallography.net/cod/optimade/v1/structures?filter=(elements%20HAS%20%20ALL%20"Li")&response_fields=lattice_vectors,cartesian_site_positions,species,species_at_sites (7.2 sec)
http://www.crystallography.net/cod/optimade/v1/structures?filter=(elements%20HAS%20%20ALL%20"Li","Co")&response_fields=lattice_vectors,cartesian_site_positions,species,species_at_sites (1min14sec)
http://www.crystallography.net/cod/optimade/v1/structures?filter=(elements%20HAS%20%20ALL%20"Li","Co","O")&response_fields=lattice_vectors,cartesian_site_positions,species,species_at_sites (1min11sec)
Queries without any of the former
http://www.crystallography.net/cod/optimade/v1/structures?filter=(elements%20HAS%20%20ALL%20"Li") (1sec)
http://www.crystallography.net/cod/optimade/v1/structures?filter=(elements%20HAS%20%20ALL%20"Li","Co") (1sec)
http://www.crystallography.net/cod/optimade/v1/structures?filter=(elements%20HAS%20%20ALL%20"Li","Co",%20"O") (1,1sec)
Asking for response_fields
definitely slows the response. And it increases a lot from 1 two 2 elements in the search. However, any of the abovementioned queries in Materials Project takes less than 1sec.