Home

>

Tools

>

Ghost

>

Releases

>

5.57.2

Ghost Release: 5.57.2

Tag Name: v5.57.2

Release Date: 8/2/2023

Ghost LogoGhost

Open-source publishing platform specifically designed for professional bloggers and publications. Focuses on clean, minimalist writing and publishing experience.

TL;DR

Ghost v5.57.2: Performance Optimization for Collections

This minor patch release focuses on performance improvements for Ghost's Collections feature, addressing database query issues that were impacting larger sites. The update also enhances theme error handling for page features, improving the developer experience when working with custom themes.

Highlight of the Release

    • Fixed excessive database queries when saving Collections
    • Improved theme error handling for page features
    • Performance optimization for sites with large numbers of posts

Migration Guide

No migration steps are required for this update. The changes are applied automatically when upgrading to v5.57.2.

Upgrade Recommendations

This update is recommended for all Ghost users, particularly those with larger sites who may be experiencing performance issues when working with Collections.

The patch contains important performance optimizations and bug fixes that improve the overall stability of Ghost, with no breaking changes or migration steps required.

To upgrade:

  • Use the Ghost-CLI for self-hosted installations: ghost update
  • Ghost(Pro) users will receive the update automatically

Bug Fixes

Fixed Excessive Database Queries on Collection Save

This release addresses a critical performance issue related to Collections. Previously, when saving a Collection, the bookshelf-relations plugin would trigger a global hook that updated the sort_order for all related items in pivot tables. For sites with many posts, this resulted in numerous database queries (at least one per post), which could severely impact database performance.

The fix disables these automatic updates for all Collections, as they're only necessary for Collections with a "manual" type. This change significantly reduces database load, especially for larger Ghost sites.

Improved GScan Error Handling for Page Features

The release also includes an update to how theme errors are handled and displayed for page features:

  • Added filtering for sidebar display of theme errors (the "angry red box")
  • Implemented feature-specific filtering for page features
  • This approach will be extended to other page features in future updates

New Features

No new features were introduced in this patch release.

Security Updates

No security fixes were included in this release.

Performance Improvements

Optimized Database Operations for Collections

This release delivers a significant performance improvement by eliminating unnecessary database queries when saving Collections:

  • Previously, saving a Collection would trigger updates to the sort_order for all related items in pivot tables
  • For sites with many posts, this could result in hundreds or thousands of database queries
  • The update disables these automatic updates for Collections, as they're only needed for Collections with "manual" type
  • This change dramatically reduces database load during Collection operations, particularly beneficial for larger Ghost sites with substantial post counts

Impact Summary

Ghost v5.57.2 delivers important performance optimizations for the Collections feature, addressing a database query issue that could significantly impact larger sites. By eliminating unnecessary database operations when saving Collections, this update reduces server load and improves overall system performance.

The release also enhances theme development with improved error handling for page features, providing more targeted error displays in the sidebar. This change makes it easier for theme developers to identify and fix issues in their custom themes.

While the Collections feature is not yet fully released, these optimizations lay important groundwork for its stable implementation, particularly for sites with large numbers of posts. The changes are non-breaking and require no migration steps, making this a straightforward but valuable update for all Ghost installations.

Full Release Notes

Statistics:

File Changed10
Line Additions170
Line Deletions13
Line Changes183
Total Commits3

User Affected:

  • Improved database performance when saving Collections, especially beneficial for sites with large numbers of posts
  • Reduced server load during Collection operations

Contributors:

allouis9larsonsgithub-actions[bot]