September 8, 2015 at 5:04 am #4290pionectMember
We’ve made a metabox for a site element which we call a block.
A block comes in 10 kind of forms so we’ve made a first select field called ‘Block type’.
Then there are around 15 fields, some specific to a particular block and some general to all.
We’ve added conditions to all these fields to define for which block types they should appear.
When changing the block type there is a delay up to 600ms shown in the Chrome developer tools.
This problem becomes really evident when we tried to use multiple instances of this block.
We want to be able to show a lot of these metaboxes so the page can be build nicely.
But upon loading the page, every single field with conditions is triggered.
And for every relation between ‘triggered-field’ and ‘conditioned-field’ there is a separate trigger.
We’ve been debugging this and found out that a single block/metabox already has 260 triggers.
When we try to work with 10 blocks for example, the page then takes to long to load and chrome proposes to kill the tab because it seems unresponsive.
But I’d love to use Piklist for this functionality.
It just looks like it really needs some optimizing.
I did find a small improvement and I’ll send a pull request for it.
September 8, 2015 at 11:34 am #4291
September 8, 2015 at 1:01 pm #4292
September 8, 2015 at 2:35 pm #4293KevinKeymaster
We have had a chance to check out your conditions against the latest beta and with few tweaks we are looking good. We are seeing at least a 50-60% improvement in speed on conditions execution. Stay tuned for the next beta later this week.
September 21, 2015 at 3:44 pm #4380
September 21, 2015 at 3:48 pm #4381
September 21, 2015 at 3:51 pm #4382
Also, try opening
class-piklist-wordpress.phpand commenting out:
add_filter('get_meta_sql', array('piklist_wordpress', 'get_meta_sql'), 101, 6);
Let us know if that works.
September 21, 2015 at 4:50 pm #4383justinMember
That seemed to help a lot. Thank you for the help. It seemed to have really speed up the entire site. I am so glad, because I have absolutely loved your plugin and have been developing with it on this new site for 9 months.
You guys are the best!
September 22, 2015 at 10:02 am #4384
- You must be logged in to reply to this topic.