Tagged: conditions
- This topic has 8 replies, 4 voices, and was last updated 6 years, 4 months ago by
Steve.
-
AuthorPosts
-
-
September 8, 2015 at 5:04 am #4290
pionectMemberWe’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.Our current solution would be to ditch the conditions and build those ourselves with some javascript of our own.
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
KevinKeymaster@pionect-
Can you send a copy of the code for your meta-boxes to [email protected]? We are rounding out the next version and I would like to test your code against it to make sure its working better.
Thanks,
Kevin
-
September 8, 2015 at 1:01 pm #4292
-
September 8, 2015 at 2:35 pm #4293
KevinKeymaster@pionect-
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.
Thanks,
Kevin
-
September 21, 2015 at 3:44 pm #4380
-
September 21, 2015 at 3:48 pm #4381
-
September 21, 2015 at 3:51 pm #4382
SteveKeymasterAlso, 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 #4383
justinMemberThat 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
SteveKeymaster@justin– Glad you love Piklist! Would you mind telling the world by leaving a quick 5-Star review on WordPress.org? It really helps the project.
-
-
AuthorPosts
- You must be logged in to reply to this topic.