salilab / pmi

Python Modeling Interface
https://integrativemodeling.org/nightly/doc/ref/namespaceIMP_1_1pmi.html
11 stars 11 forks source link

ProcessOutput is slow; don't use eval() #230

Closed saltzberg closed 9 months ago

saltzberg commented 7 years ago

Reading stat files using eval() is very slow. Rewriting this with standard string parsers should speed this up by a fewfold.

benmwebb commented 7 years ago

It's also horribly insecure, since an evil person could put arbitrary Python code in a stat file.

benmwebb commented 9 months ago

This should be more secure since we use ast.literal_eval instead of plain eval now. Long term, stats should be stored in the RMF file anyway.