- Issue created by @catch
- π¬π§United Kingdom catch
For the record, the coffee AJAX request takes 100ms and 96k function calls and 107 database queries when looking in xhprof, this is compared to 96ms and 74k function calls and 73 database queries for the page itself.
- π¬π§United Kingdom catch
Opened π Get coffee data only when the search box is opened Active .
- π¦πΊAustralia pameeela
No tag forthcoming, so we probably need to make a call on whether to pull this out.
- πΊπΈUnited States phenaproxima Massachusetts
IMHO we should not. This only affects logged-in users with access to Coffee (in most sites that's probably only a few users), and @ckrina felt that the value outweighs the performance drag.
It's a product decision, so your word is law, but I would keep it. I don't think 100 extra milliseconds and a hundred extra database queries are going to matter to our target audience.
- π¬π§United Kingdom catch
I don't think 100 extra milliseconds and a hundred extra database queries are going to matter to our target audience.
Just because the target users for Drupal CMS are not trying to scale sites to millions of site visits per month or millions of nodes, doesn't mean they don't need their sites to be snappy and cheap to host.
Drupal CMS users are likely to want to host on relatively cheap hosting, which in some cases bill by traffic rather than resources, they're also likely to do a lot more admin on their production environment, given they may not have a local environment at all.
I'm not massively familiar with all the hosting options out there but one I do know which charges by traffic is Pantheon.
Pantheon hosting tiers are based on 'pages served' which includes any response originating from the CMS.
https://docs.pantheon.io/guides/account-mgmt/traffic#pages-servedThe 'xtra-small' plan allows 125k pages per month.
Someone building/adding content on production could easily be hitting ~200 pages per day (four hours/day, 50 pages/hour) while their site is in active development or they're adding content.
If coffee is installed in its current state, this will double to 400 'pages served' according to Pantheon's usage policies due the extra AJAX request on every page they visit.
400*30 = 12,000 or 10% of their monthly usage limit. You only need to go over by a couple of thousand to get bumped up to the next tier.
It could also be an issue for demo hosting providers, where effectively 100% of the traffic is going to be admin users (because they're trying out the demo, unless they log out/use incognito to see what pages are like for anon).
- π¦πΉAustria nebel54 Vienna
As a quick update from the coffee side: I just released a new version 2.0.1 that includes https://www.drupal.org/project/coffee/issues/3494208 π Get coffee data only when the search box is opened Active which should solve the issue for now, as the AJAX request is only fired when needed.