Connected Vehicle Accelerator - Potential scaling issues?

Hi All,

We are currently using the TIBCO LiveView and Streambase suite with the Conntected Vehicles Accelerator for a customer in Melbourne and have come across a possible scaling issue on the User Interface. We currently receive around 100msg per second through to the UI from a moving asset live positioning system tracking multiple ground and air vehicles.

The solution is stable and working, however there appears to be a memory leak in one of the object update processes which causes the browser to become bloated and experience some degradation in performance when running for extended periods.

 

Has anyone else experienced similar issues when attempting to scale the connected vehicles accelerator? If so, can the community offer any solutions?

I have attached a code snippet of what we think is the offending process.

 

thanks,

Andrew

function run() {
     // Create the icon if specified
     if (scope.options.icon != undefined) {

         // Update the contentScope if it has complex content
         if (self.hasComplexContent) {
             self.context.contentScope.object = self.data;
             self.context.contentScope.component = self;
         }

         if (self.hasComplexContent == false) {
             self.node.setIcon(L.icon(self.iconOpts));
             self.visible = ctrl.getVisibility();
             self.updateVisibility(false);
         }
         else {
             var parentScope = scope;
             var content = self.context.$compile(self.context.contentScope, function (clonedElement, scope) {
                 // This allows a delay to permit the template to render without flickering in the UI
                 scope.$evalAsync(function () {
                     // Optimization will only update the label if it has changed
                     if (self.context.contentScope.component.model.options.iconHtml != undefined && self.icon.options.html != clonedElement[0].innerHTML) {
                         var n = $(self.node._icon);
                         n.empty().html(clonedElement);
                     } else {
                         if (self.icon.options.labelText != clonedElement[0].innerHTML) {
                             //self.icon.options.labelText = clonedElement.html();
                             self.icon.options.labelText = '';
                             self.node.setIcon(self.icon);

                             var n = $(self.node._icon).find('.leaflet-marker-iconlabel');
                             n.empty().html(clonedElement);
                         }
                     }
                     self.visible = ctrl.getVisibility();
                     self.updateVisibility(false);
                 });
             });
         }
    }
};

 

(1) Answer

Login