spacebase / spacebasenz

Website for SpaceBase New Zealand
http://dev-spacebasenz.pantheonsite.io/
GNU General Public License v2.0
0 stars 0 forks source link

324 - Assess site performance bottlenecks #330

Open treasuretron opened 4 years ago

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on Feb 25, 2019, 22:11

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on Feb 25, 2019, 22:11

changed title from Assess site performance bottlenecks to {+324 - +}Assess site performance bottlenecks

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on Feb 25, 2019, 22:11

assigned to @jayelless

treasuretron commented 4 years ago

In GitLab by @jayelless on Feb 27, 2019, 18:15

Views caching is set to tag based, which means that if any of the details of a tagged entity changes, then the cache should be invalidated. The contexts and tags specified for the front page map are (from the detail in the file views.view.organizations_nz_overview_map.yml):

    cache_metadata:
      max-age: -1
      contexts:
        - 'languages:language_content'
        - 'languages:language_interface'
        - url
        - user
      tags:
        - 'config:core.entity_view_display.group.organization_group.default'
        - 'config:core.entity_view_display.group.organization_group.map_display'
        - 'config:core.entity_view_display.group.organization_group.search_result'
        - 'config:field.storage.group.field_map_address'
        - 'config:field.storage.group.field_website'

This indicates that the view cache depends (among other things) on the user viewing it, and details of any included organization (which is ALL of them). Each user will have a separately cached copy, and if any organization details are updated, then all cached copies of this view will be invalidated, and will need to be rebuilt.

Use of the contrib module "Views Custom Cache Tags" (https://www.drupal.org/project/views_custom_cache_tag) may allow better control of the cache contexts and tags to improve the cachability of custom views. There is also another similar module "Views Advanced Cache (https://www.drupal.org/project/views_advanced_cache) that possibly allows better control, but this is not yet available in a production release nor is it used in many sites.

treasuretron commented 4 years ago

In GitLab by @richbodo on Mar 15, 2019, 06:23

changed the description

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on Apr 10, 2019, 01:18

All caching has been turned off on dev, so I've re-enabled it on the 322 branch which I'm about to merge. Overall we need to make sure caching is emabled and that config exported to system.performance.yml before a branch is ready to commit.

Also looking at chrome inspector, toobar.svg has a massive network loading lag, we should have a look at this together at some point.

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on Apr 10, 2019, 01:31

I think we should default to time based caching for most views unless there is a specific reason not to.