The following SPARQL query runs in less than 1 second...
SELECT ?item ?itemLabel WHERE { { SELECT ?item WHERE { ?item wdt:P31 wd:Q5. } LIMIT 10 } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }
... while the following query, which is equivalent but much simpler and common, runs in more than 17 seconds...
SELECT ?item ?itemLabel WHERE { ?item wdt:P31 wd:Q5. SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } LIMIT 10
There's no point in having SERVICE wikibase:label optimized for the first case, we need a cleverer implementation that doesn't cause unnecessary timeouts. This optimization becomes more necessary as the number of triples grows.