Problem/Motivation
Currently, pathauto stores its `pathauto_state.*` collection data in the key_value table. On our site, that means that we have:
collection key count
pathauto_state.media 1931155
pathauto_state.node 1137720
over 3 million rows in the key_value table used by pathauto. Since key_value is heavily used by Drupal, this leads to a sag in performance hits for any meaningfully sized web site.
Steps to reproduce
1. Create a Drupal site. Install pathauto.
2. Use devel:generate to generate 10,000 items of content. Measure page load speed both cached and uncached.
3. Use devel:generate to generate 3,000,000 items of content (this will take a long long time). Measure page load speeds.
Proposed resolution
Give pathauto its own data table to use so other processes have less work to do. This would also benefit pathauto directly in that we would no longer have to use serialization to read/write the data, but, given control over the schema of this new table, could massively reduce drag within pathauto itself by storing the data in discrete, normalized rows instead.
Remaining tasks
Design a pathauto table
Add an update hook to pathauto.install to install the new table and convert the data in key_value to rows in that table.
Update code the writes or reads to or from the pathauto_state.* collections to use the new table instead.
User interface changes
None.
Data model changes
New database table to store pathauto_state.* data.