Tagged: 

Viewing 8 reply threads
  • Author
    Posts
    • #4290
      pionect
      Member

      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.

      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.

    • #4291
      Kevin
      Keymaster

      @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

    • #4292
      Steve
      Keymaster

      @pionect– Got your code and was able to reproduce. Working on a fix for the next version of Piklist.

    • #4293
      Kevin
      Keymaster

      @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

    • #4380
      justin
      Member

      @kevin Do you think I could get access to the beta? My site is having major speed issue.

    • #4381
      Steve
      Keymaster

      @justin– just give us a few more days.

    • #4382
      Steve
      Keymaster

      Also, try opening class-piklist-wordpress.php and commenting out: add_filter('get_meta_sql', array('piklist_wordpress', 'get_meta_sql'), 101, 6);

      Let us know if that works.

    • #4383
      justin
      Member

      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!

    • #4384
      Steve
      Keymaster

      @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.

Viewing 8 reply threads
  • You must be logged in to reply to this topic.