djgxp
Member
I'm doing some development on a huge forum with about 3.5 million threads.
I have an extended class for XF:Thread in an addon that is adding a new field is_faq which is a boolean.
I have about 6000 urls to convert to /faq/... instead of /threads/...
First, in my extended class, just before the parent action, I was adding route filters if it where not existing for threads having 1 in my is_faq field and it was working.
Some flagged threads where well redirected to /faq/... instead of /threads/... .
But my problem is that when I reached about 5000 urls in route filter table, my Xenforo forum became dramatically slow because for each urls built in the page, it was doing 5000 preg_replace and about 10 million on a page then.
So as this is not possible this way, I want to avoid using route filters, maybe creating a new route which would take care about my DB field is_faq.
Is that possible ? (so that my forum listings would build well /faq/... links for the flagged threads and without using route filters. )
---
Or another suggestion would be to rework/improve the Router::applyRouteFilterToUrl method in order to avoid this CPU load due to the number of preg_replace done for 1 link.
I have an extended class for XF:Thread in an addon that is adding a new field is_faq which is a boolean.
I have about 6000 urls to convert to /faq/... instead of /threads/...
First, in my extended class, just before the parent action, I was adding route filters if it where not existing for threads having 1 in my is_faq field and it was working.
Some flagged threads where well redirected to /faq/... instead of /threads/... .
But my problem is that when I reached about 5000 urls in route filter table, my Xenforo forum became dramatically slow because for each urls built in the page, it was doing 5000 preg_replace and about 10 million on a page then.
So as this is not possible this way, I want to avoid using route filters, maybe creating a new route which would take care about my DB field is_faq.
Is that possible ? (so that my forum listings would build well /faq/... links for the flagged threads and without using route filters. )
---
Or another suggestion would be to rework/improve the Router::applyRouteFilterToUrl method in order to avoid this CPU load due to the number of preg_replace done for 1 link.
Last edited: