Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

loading page time too high

  • sacromar
  • sacromar
  • OFFLINE
  • Posts: 38
  • Thanks: 0
  • Karma: 0
8 years 9 months ago #276563 by sacromar
loading page time too high was created by sacromar
Hi, I have a lot of cb fields on my site (up to 300). I used CB conditional to show and hide fields, but when I edit a profile loading page time is too high, maybe because it loads all fields, also those useless.

How can I solve this problem?
Thank you

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
8 years 9 months ago #276641 by krileon
Replied by krileon on topic loading page time too high
You have 300 fields being conditioned by JS. It's going to be slow. There's no getting around that. That's a absolutely massive amount of input elements for a <form in general, but significantly more for JS to have to condition.

How can I solve this problem?

Reduce the number of fields you're using. It's important to think of why you need that many fields and how you can reduce the strain on your users to deal with that many fields.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • sacromar
  • sacromar
  • OFFLINE
  • Posts: 38
  • Thanks: 0
  • Karma: 0
8 years 9 months ago #276644 by sacromar
Replied by sacromar on topic loading page time too high
I can't reduce the fields, every user must have the chance to edit up to 300 fields depending on the conditions, maybe in most cases it will edit only 5 or 6 fields and then displaying only 5 or 6 fields , but the user must have the way to edit them all.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
8 years 9 months ago #276656 by krileon
Replied by krileon on topic loading page time too high
You're conditioning over 300 HTML elements to show/hide. That's heavy for JS to have to do. Each fields is roughly a total of 5 elements to hide. So that's 1,500 HTML elements with displays being conditioned. To confirm if the conditions JS is doing it unpublish CB Conditionals then see if your performance issue persists.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • sacromar
  • sacromar
  • OFFLINE
  • Posts: 38
  • Thanks: 0
  • Karma: 0
8 years 9 months ago #276666 by sacromar
Replied by sacromar on topic loading page time too high
Yes, if I disable cb conditional plugin, the performance issue is solved, but all fields appear

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
8 years 9 months ago #276672 by krileon
Replied by krileon on topic loading page time too high
Then you've too many fields being conditioned. You're changing the DOM state of so many elements with JS it's going to be slow. It's not server performance though, but the browser is choking due to JS performance. You maybe able to improve the performance by using tab conditions to condition entire tabs instead of individual fields. You can also disable value resetting in CB Conditional > Parameters as it resets the input value on hide, which also takes additional JS parsing.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum