• Bug
  • Status: Closed
  • Resolution: Fixed
  • drb
  • Reporter: sourceforgetracker
  • September 21, 2009
  • 0
  • Watchers: 0
  • September 22, 2009
  • September 22, 2009

Description

I have a factory service where I read txt files in to a List of maps. According to my business requirement I’ll find a row that has matching key(s). These finds works ok for small size of txt files. But for very large files, I am worried about the performence. So thought of trying for EHCACHE. I created the cache, added cache name. added list to element. how can I find my row directly from the element. instead of getting the list back from the element and find my row.

here is my data looks like :

List dataLst =[[“eFactor”:0.0000, “colaDurCde”:null, “equivCPI”:0.0000, “colaPct”:null, “halfCPI”:0.0000, “colaTypeCde”:1, “version”:1, “mFactor”:1.0000], [“eFactor”:0.6110, “colaDurCde”:3, “equivCPI”:4.8520, “colaPct”:8.0000, “halfCPI”:2.4430, “colaTypeCde”:4, “version”:1, “mFactor”:1.0370]] In the above list, each element corresponds to a row. I do a find(using groovy) like this

dataLst.find{row -> row.colaTypeCde == 4 &&
row.colaPct == 7.0000 && row.colaDurCde == 1}

Please reply ASAP.

Is there is a way to find a row faster using EHCache element? The size of my txt file is around 7000 KB.

Thanks in advance.

Sourceforge Ticket ID: 1404779 - Opened By: vahida - 13 Jan 2006 14:14 UTC

Comments

Sourceforge Tracker 2009-09-21

Logged In: YES user_id=693320

Hi

It sounds like you need to search on multiple keys. Check out jofti.com which provides that service. Jofti can be backed by ehcache.

Regards Greg Luck Comment by: gregluck - 15 Apr 2006 08:51 UTC

Fiona OShea 2009-09-22

Re-opening so that I can properly close out these issues and have correct Resolution status in Jira