Python tips for memory optimization

前端 未结 7 1823
心在旅途
心在旅途 2020-12-24 04:07

I need to optimize the RAM usage of my application.
PLEASE spare me the lectures telling me I shouldn\'t care about memory when coding Python. I have a memory problem be

7条回答
  •  隐瞒了意图╮
    2020-12-24 04:16

    I've had situations where I've had a collection of large objects that I've needed to sort and filter by different methods based on several metadata properties. I didn't need the larger parts of them so I dumped them to disk.

    As you data is so simple in type, a quick SQLite database might solve all your problems, even speed things up a little.

提交回复
热议问题