Top-Q / difido-reports

This project aims to provide a generic implementation for HTML test reports.
http://top-q.github.io/difido-reports
Apache License 2.0
47 stars 31 forks source link

Starting new test and generating the reports is taking too long #187

Closed itaiag closed 6 years ago

itaiag commented 6 years ago

When starting test, updating test or getting the list of all execution, the response time is taking too long. On my environment it takes about ~40ms for every 1000 executions that are stored in the server. Investigation shows that the bottle neck is in the sorting mechanism in the AbstactMetadataPersistency component.

    @Override
    public synchronized List<ExecutionMetadata> getAll() {
        readFromPersistency();
        final List<ExecutionMetadata> result = new ArrayList<ExecutionMetadata>();
        result.addAll(executionsCache.values());
        synchronized (this) {
            Collections.sort(result);
        }
        return result;
    }

We need to move the sorting to the client side.