TinyMCE faqlistbox does not scale to 61K entries, PMF 2.6.5

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
dajoker
Posts: 59
Joined: Sat Jan 30, 2010 1:01 am

TinyMCE faqlistbox does not scale to 61K entries, PMF 2.6.5

Post by dajoker »

I know this is probably a no-brainer, but disabling this was a bit more work than I thought it would be originally so this is mostly an FYI unless somebody wants to propose a great way to re-enable this feature without requiring me to give PHP a gigabyte of RAM and highly recommending a broadband connection to users trying to author FAQs.

The diff to make this change follows:

Disable previous-FAQ list in TinyMCE by hacking ./phpmyfaq/admin/footer.php as shown below:
<quote file='./phpmyfaq/admin/footer.php' version='2.6.5'>
80d79
< /*
91d89
< */
120c118
< // theme_advanced_buttons4 : "faqlistbox",
---
> theme_advanced_buttons4 : "faqlistbox",
</quote>

Unfortunately simply commenting out the 'faqlistbox' line above was not enough because the PHP still generates the list regardless of whether or not TinyMCE is going to use it. That little details caught me up for quite a while. Anyway the change above comments out the listbox in TinyMCE (so it doesn't show up and look like it doesn't work) as well as prevents PHP from calculating the list of FAQs on every load of the authoring page.

A guess for a way to improve this would be to periodically have something write out what would be the listbox to a flat file and then setup TinyMCE to pull that in from time to time (so it's just a big file instead of a big file generated via a big query against the database with a lot of substring work in PHP). I haven't tried or have experience with TinyMCE but that may help with larger implementations in case others hit this same bottleneck. I'm open to other suggestions as this looks like a nice feature but currently I'm killing PHP just trying to load this page which means the entire TinyMCE bar fails to load.

Thanks.
Thorsten
Posts: 15728
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: TinyMCE faqlistbox does not scale to 61K entries, PMF 2.6.5

Post by Thorsten »

Hi,

I know about this problem from an other company with almost 1K entries.

My idea is to remove the dropdown list and use the same "find as you type" functionality like we use for the instant response. What do you think?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
dajoker
Posts: 59
Joined: Sat Jan 30, 2010 1:01 am

Re: TinyMCE faqlistbox does not scale to 61K entries, PMF 2.6.5

Post by dajoker »

That may work better, especially if the find-as-you-type only queries based on the number. Find as you type is something else I need to probably disable unless you have some pointers about it. It is a neat idea but doesn't seem to work well in this setup. After typing in the string of data it will refresh every few seconds with different results that seem to be various substrings of what was typed in. For example if you type in 'directory structure' the first return will have 'dir' and a few seconds later entires for 'directory' will come up and later 'directory structure' things. Either way I'm not sure if this is a problem because of size or just because of how it works normally. Being able to somehow populate an existing FAQ entry's link into a new or another FAQ entry is all I'm really after. Worst-case users can just type in the FAQ numbers themselves or something. :-\
Post Reply