Opened 3 years ago

Closed 3 years ago

#2584 closed enhancement (fixed)

Petascope - Enhance XML to string for WMS GetCapabilities

Reported by: Bang Pham Huu Owned by: Bang Pham Huu
Priority: major Milestone: 10.0
Component: petascope Version: 9.8
Keywords: Cc:
Complexity: Medium

Description

Currently, WMS GetCapabilities handler uses String concatenations for building XML output, then it uses XMLUtil.format(String) which randomly takes long time.

For example:

        startTime = System.currentTimeMillis();
        
        getCapabilitiesTemplate = XMLUtil.formatXML(getCapabilitiesTemplate);
        
        endTime = System.currentTimeMillis();
        
        log.info("### Time to format XML in GetCapabilities is: " + (endTime - startTime) + " ms.");

KVPWMSGetCapabilitiesHandler@179: ### Time to format XML in GetCapabilities is: 3737 ms

So, petascope should build the whole XML Element and then use XMLUtil.format(Element) to generate XML string which will be faster.

Also, this needs to be enhanced

List<Layer> layers = this.wmsRepostioryService.readAllLayersFromCaches();
## Time to read all layers from cache is: 2105 ms

Change History (1)

comment:1 by Bang Pham Huu, 3 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.