- Issue created by @dieterholvoet
19:58 17:06 Running- Status changed to Needs review
11 months ago 11:42am 3 June 2024 - last update
11 months ago 11 pass - Status changed to Closed: won't fix
11 months ago 2:02pm 3 June 2024 - 🇧🇪Belgium dieterholvoet Brussels
It seems like my implementation doesn't account for paging. Also, I did some basic benchmarking to compare the results of both approaches:
TwigTweakExtension::drupalViewResultCount();
count(views_get_view_result());
I ran both functions 3000 times on a view in one of my projects. The first approach took 0.0147 seconds, the second one 0.0101. Weird, but it looks like the count query is slower, even though it's not paged. It also looks like both queries are already very fast, so the result will be negligible - especially when the loaded entities already exist in entity cache.
I'll close this issue, it's not worth it.