Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Slow adding New Categories
phiw13 wrote #331405:
This does not seem to be related to the category changes discussed above…
Nope.
There is no feedback from Textpattern – no messagepane. The category is not deleted. Luckily, as that is expected.
…
If I try the same on the Articles panel, I do get an error message:Could not delete section(s), articles are currently assigned: articles., as expected.
There is even no such string for categories.
Offline
Re: Slow adding New Categories
Clearly, txp was not designed with thousands of categories in mind. BTW, Rabah, how long does it take on the public side to output
<txp:category_list children sort="name DESC" wraptag="ul" break />
Offline
Re: Slow adding New Categories
etc wrote #331411:
Nope.
There is even no such string for categories.
Old issue then… :-( Worth a Github issue
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: Slow adding New Categories
etc wrote #331412:
Clearly, txp was not designed with thousands of categories in mind. BTW, Rabah, how long does it take on the public side to output
<txp:category_list children sort="name DESC" wraptag="ul" break />...
Hi Oleg
Yes txp in not designated for such amount, but it works even with that amount, then it s ok no ? And the improvements i am looking can be made by plugin then it s fine.
A complete page containing the categories (but not only):
<!-- Trace summary:
Runtime : 550,79 ms
Query time: 217,07 ms
Queries : 985
Memory (*): 11849 kB
-->
PS: The only change that could made in core is this one maybe :
Making the tree using ul/li construction instead of <p>.
Offline
Re: Slow adding New Categories
Dragondz wrote #331415:
Yes txp in not designated for such amount, but it works even with that amount, then it s ok no ?
It is ok if there is no better way, but there seem to be a room for improvement in txp categories management.
A complete page containing the categories (but not only): …
Queries : 985
Wow, that’s way too many, where are they coming from? Theoretically (and my tests confirm it), the whole tree should be retrieved in a single query, please check in debug mode if you can.
PS: The only change that could made in core is this one maybe :
Making the tree using ul/li construction instead of <p>.
You mean public side? BW-compatibility, when you hold us…
Offline
Re: Slow adding New Categories
etc wrote #331416:
Wow, that’s way too many, where are they coming from? Theoretically (and my tests confirm it), the whole tree should be retrieved in a single query, please check in
debugmode if you can.
Ah sorry i havent precised it was with txp 4.8.7, with the 4.8.8 and a page containing txp:categort_list i got this one :
<!— Trace summary:
Runtime : 236,95 ms
Query time: 18,62 ms
Queries : 10
Memory (*): 9591 kB
—>
You mean public side? BW-compatibility, when you hold us…
I mean backend.
Offline
Offline
Re: Slow adding New Categories
etc wrote #331425:
The markup should be easy to modify, dunno re styling
ullists. There are checkboxes to align.
The styling is not terribly difficult, even the alignment of the checkboxes is fairly easy. More complex would be implementing a show/hide mechanism for the child categories as suggested by Rabah above. Particularly, the interaction(s) with the multi-edit widget would need some attention…
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: Slow adding New Categories
phiw13 wrote #331429:
The styling is not terribly difficult, even the alignment of the checkboxes is fairly easy. More complex would be implementing a show/hide mechanism for the child categories as suggested by Rabah above. Particularly, the interaction(s) with the multi-edit widget would need some attention…
Hi,
I only wanted to have the markup be changed to ul/li, the hide show mechanism will easily be made by a simple plugin, because i dont think a lot of people are using a lot of categories.
Cheers.
Offline
Re: Slow adding New Categories
Altering categories should be much faster in 4.8.8 now, especially when you have thousands of them. This has required much code rewriting, so please test if everything works as expected. We are waiting for Phil’s opinion to eventually change the HTML markup on the admin side.
As a by-product, <txp:category_list /> has got some enhancements to easily output category trees/branches:
<!-- output a nested tree of 'somecat' children -->
<txp:category_list parent="somecat" children wraptag="ul" break>
<txp:category />
</txp:category_list>
<!-- output the path from parent to child category -->
<txp:category_list parent="somecat" categories="childcat" wraptag="ul" break />
Offline
Re: Slow adding New Categories
Thanks Oleg,
I will make some testings next week.
Offline
Re: Slow adding New Categories
etc wrote #331499:
Altering categories should be much faster in 4.8.8 now, especially when you have thousands of them.
a first quick test, with about 50 categories: category lists and category based pages feel faster. And all still display as expected so far :-) Will see if/how I can test with more categories (thousands probably not, though, wouldn’t know how to handle those…)
BTW, I had a play at building the category panel as a list (mockup, articles only) – here.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
Re: Slow adding New Categories
phiw13 wrote #331502:
a first quick test, with about 50 categories: category lists and category based pages feel faster. And all still display as expected so far :-) Will see if/how I can test with more categories (thousands probably not, though, wouldn’t know how to handle those…)
I have tested with ~1000 categories, and, say, deleting few categories switches from ~1000 queries and 1.7s to almost immediately. You can call
<txp:php>rebuild_tree_full('article');</txp:php>
to emulate the previous behaviour (and also restore the tree if anything goes west).
BTW, I had a play at building the category panel as a list (mockup, articles only) – here.
Looks fine, thank you. I leave the decision with you UX gurus.
Offline
Re: Slow adding New Categories
Hi
I downloaded today the 4.8.8 branch to test the category change but got an error message when going to admin :
( ! ) Fatal error: Uncaught TypeError: Return value of Textpattern\Textfilter\Registry::offsetSet() must be an instance of Textpattern\Textfilter\void, none returned in C:\wamp64\www\textpattern-4.8.7\textpattern\vendors\Textpattern\Textfilter\Registry.php on line 160
( ! ) TypeError: Return value of Textpattern\Textfilter\Registry::offsetSet() must be an instance of Textpattern\Textfilter\void, none returned in C:\wamp64\www\textpattern-4.8.7\textpattern\vendors\Textpattern\Textfilter\Registry.php on line 160
It s a dev branch after all.
Cheers.
Offline
Re: Slow adding New Categories
phiw13 wrote #331502:
BTW, I had a play at building the category panel as a list (mockup, articles only) – here.
I Phil, it s really nice, it s good to see the ul/li construction after all, i can then publish some little plugins to add some functions like: Show/Hide children / Slide to a desired category / View name category or title category, …
Cheers.
Offline