Problem/Motivation

Checking page weight for the front page of Byte, I noticed that the views.ajax library is loaded on the anonymous front page.

This is because the 'blog' view enables 'use_ajax' globally, instead of only for the blog listing itself. The two blocks don't appear to have any kind of exposed filters or pager, so they don't need AJAX.

I tried to update the view but ran into a validation error on save (something about the tags filter not having any valid values) and then after removing that filter to get past it and exporting the config, what looked like several other unrelated changes.

If it wasn't for webform (the next issue I'm about to open), it looks like this change would also save loading jQuery in general, which would mean well over 100kb of JavaScript saved. But just configuring the views slightly differently will save loading the entire AJAX library by the looks of things which will still be tens of kb.

Steps to reproduce

Proposed resolution

User interface changes

Configuration changes

Issue fork drupal_cms-3553276

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

catch created an issue. See original summary.

pameeela’s picture

Project: Drupal CMS development repository » Byte
Version: » 1.x-dev
Component: Track: Blog » Code

This is in the Byte config. I forgot to create an issue for that broken blog config problem, it's extremely wonky and we need to sort it out, basically an early days workaround that we need to fix properly.

pameeela’s picture

Project: Byte » Drupal CMS development repository
Version: 1.x-dev »
Component: Code » General
Related issues: +#3554686: Fix broken blog view config

Whoops, sorry -- the underlying blog config that needs to be updated to disable Ajax is still in the original blog recipe! I created #3554686: Fix broken blog view config to fix the broken config.

pameeela’s picture

Status: Active » Needs review

phenaproxima’s picture

Status: Needs review » Fixed

Merged into 2.x and cherry-picked to 2.0.x and 1.2.x. I don't see much reason to not backport this performance improvement.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.