TStringList of objects taking up tons of memory in Delphi XE

后端 未结 10 1445
遇见更好的自我
遇见更好的自我 2021-01-05 14:50

I\'m working on a simulation program.

One of the first things the program does is read in a huge file (28 mb, about 79\'000 lines,), parse each line (about 150 field

10条回答
  •  清酒与你
    2021-01-05 15:25

    Reading though the comments, it sounds like you need to lift the data out of Delphi and into a database.

    From there it is easy to match organ donors to receivers*)

    SELECT pw.* FROM patients_waiting pw
    INNER JOIN organs_available oa ON (pw.bloodtype = oa.bloodtype) 
                                  AND (pw.tissuetype = oa.tissuetype)
                                  AND (pw.organ_needed = oa.organ_offered)
    WHERE oa.id = '15484'
    

    If you want to see the patients that might match against new organ-donor 15484.

    In memory you only handle the few patients that match.

    *) simplified beyond all recognition, but still.

提交回复
热议问题