SuffolkLITLab / EfileProxyServer

A proxy server that acts as an Efiling Service Provider, connecting guided interviews to Efiling Managers on Tyler Technologies implementation of ECF 4.0
https://suffolklitlab.org/docassemble-AssemblyLine-documentation/docs/efiling/overview/
MIT License
3 stars 2 forks source link

Don't load entire codes XML into memory #114

Open BryceStevenWilley opened 1 year ago

BryceStevenWilley commented 1 year ago

Have been running into Heap overflows when updating codes. Still trying to narrow down which exact state it is, but it's failing when trying to execute the batch update in the postgres driver.

One possible way to reduce some memory pressure at this point is to not simply unmarshall the entire CodeListDocument at once, but to read each row individually. I think the best idea here is to do something like this: https://stackoverflow.com/a/16935069/11416267 in lines 164 and 175 of CodeDatabase. We just need to get the codes version and each individual row.

If there are still issues, we can look into doing separate Postgres updates not in batch, or simply making the batches smaller if there are over some amount of rows.

TODO:

Independently:

BryceStevenWilley commented 1 year ago

Got a heap dump last night, here's all the useful info I can get from it: