super-table icon indicating copy to clipboard operation
super-table copied to clipboard

Unnecessary update-search-index processes for unchanged items

Open janreges opened this issue 2 years ago • 0 comments

Describe the bug

Hi,

Apparently, the SuperTable plugin does not detect whether there was any text change when saving existing items and generates update-search-index processes for all items, which can be hundreds or thousands of unnecessary processes.

For example - we used SuperTable for a simple translation solution for our frontend, which runs in Astro (via GraphQL).

We have hundreds of these items there, and even editing one word will generate hundreds of processes to update the search-index.

image

Steps to reproduce

  1. Create simple supertable field with 2 fields/columns
  2. Put 100 rows into this table
  3. Even if you later edit only one text item in this table and save it, the plugin will generate an update-search-index process for all, even unchanged, items.

The expected behavior is that when saving, it is detected whether the value has changed (e.g. based on affected rows after the UPDATE query has been executed) and if not, the searchindex update process will not be invoked unnecessarily.

Thanks for improving this behavior.

Craft CMS version

4.4.14

Plugin version

3.0.9

Multi-site?

Yes

Additional context

No response

janreges avatar Jun 27 '23 23:06 janreges