Permalink Manager was originally developed with small and medium-sized websites and WooCommerce stores in mind. As a result, it may not offer optimal performance for a very large websites.
To reduce the number of SQL queries and therefore reduce the pageload time, the plugin stores all custom permalinks within a single serialized array. The main reason for this is that the operations on arrays are generally quicker if they are made directly via PHP.
While this method works effectively for typical websites, even those with thousands of custom permalinks, it may not scale as efficiently for exceptionally large websites.
Performance Limitations
PHP Limitations
In typical use case, the plugin can store and rewrite 60,000-80,000 of custom permalinks without any major issues. Nevertheless, extremely large array can slow down the pageload time. The bigger the array, the more time PHP needs to process it.
If you need to rewrite more than 80,000 permalinks, you may notice a small performance decrease. This limit is not fixed and it will vary depending on the server and cache configuration.
MySQL Limitations
The array size can also influence MySQL performance since all custom permalinks reside in a single database row. The array size can also influence MySQL performance since all custom permalinks reside in a single database row.
As this row grows, it may reach a point where MySQL throws an error like "Got packet bigger than 'max_allowed_packet' bytes". This indicates that the custom permalinks array has exceeded the size allowed by the max_allowed_packet configuration.
Reducing Plugin Data Size
If you want to decrease the size of the custom permalinks array, consider excluding content types that do not require a customized permalink different from their original URL. A common example is the attachments (Media) post type, which usually does not need customization.