jQuery UI Widgets Forums Gauges and Maps Gauges Performance Issue with updating Gauge Label Text

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 3 years, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • dconyers
    Participant

    Hello –

    I’ve used the jqxgauge to build a gauge that includes the value show in text (please see here), but now I’m having performance issues anytime the label updates. As you can see here, the updating of the label is taking 80ms+. When I comment out the updating of the label, the performance hit for the update is negligible (1.3ms). Can you please take a look at the code I’ve written below and provide guidance/insight into a more efficient way to get the label to update?

        this.$scope.$on("jqxGaugeCreated", (event) => {
          this.$scope.$watch(() => {
            return this.loadCellDataService.getLoadCellWeight();
          }, () => {
            this.balerData.currentWeight = this.loadCellDataService.getLoadCellWeight();
            this.gaugeSettings.caption.value = "" + this.balerData.currentWeight + " lbs.";
            this.gaugeSettings.apply("caption", this.gaugeSettings.caption);
          });
         });
    • This topic was modified 3 years, 10 months ago by  dconyers.
    • This topic was modified 3 years, 10 months ago by  dconyers.
    • This topic was modified 3 years, 10 months ago by  dconyers.
    • This topic was modified 3 years, 10 months ago by  dconyers.

    Peter Stoev
    Keymaster

    Hi dconyers,

    From this code, we do not know what is the issue. We see 2 gauge updates within a Watch function. If that watch function is executed multiple times, you will have performance issue.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.