Ticket #559 (closed Enhancement: fixed)

Opened 11 years ago

Last modified 11 years ago

Core API: ResultSet should be ResultList

Reported by: jri Owned by: jri
Priority: Major Milestone: Release 4.1.3
Component: DeepaMehta Standard Distribution Version: 4.1.2
Keywords: Cc: dgf, Malte
Complexity: 3 Area: Application Framework / API
Module: deepamehta-core

Description

This would allow for sorting topics at server side, e.g. to provide paged search results.

Thanks, Malte, for bringing up this topic!

Change History

comment:1 Changed 11 years ago by jri

  • Status changed from new to accepted

comment:2 Changed 11 years ago by Jörg Richter

Global replace Sets by Lists (#559).

BREAKING CHANGES

Core API:

  • Rename class ResultSet? and change package de.deepamehta.core.ResultSet --> de.deepamehta.core.service.ResultList
  • Drop ResultList?'s method getIterator(). Use iterator() instead.

Global:

  • Core Service API and DeepaMehtaObject? API thoroughly uses Lists instead of Sets. A lot of methods are concerned. Too much to be listed here. -> You must adapt your plugins. Adaption should be straight forward.

One reason for this change:

HashSet? consumes about 5.5 times more memory than ArrayList? for the same number of elements (although they're both still linear), and has significantly slower iteration (albeit with the same asymptotics); a quick Google search suggests a 2-3x slowdown for HashSet? iteration versus ArrayList?.

http://stackoverflow.com/questions/10799417/performance-and-memory-allocation-comparision-between-list-and-set

See #559.

comment:3 Changed 11 years ago by jri

  • Status changed from accepted to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.