monal-im / Monal

Monal for XMPP (iOS and macOS)
https://monal-im.org
Other
503 stars 104 forks source link

[Bug]: Memory leak when using SwiftSoup #1253

Open tmolitor-stud-tu opened 2 days ago

tmolitor-stud-tu commented 2 days ago

We are using SwiftSoup to parse the html in MLOgHtmlParser.swift in order to create an url preview.

Sometimes parsing will swallow up all available ram+swap until the OS kills the app.

We should switch to some other html parser, possibly written in rust, to fix this and remove the SwiftSoupdependency.

tmolitor-stud-tu commented 1 day ago

URL triggering this (needed 42 minutes on a x86 macOS computer to crash with an out of memory error): https://bugs.documentfoundation.org/buglist.cgi?bug_id=34340,36958,63598,84583,85435,100758,106108,122784,129808,132064,132274,133066,134629,135424,137298,141577,142120,142244,144050,144113,146231,146998,147399,148857,148865,151754,152297,152298,153188,153507,153772,155612,156047,156555,157324,157334,157662,158092,159362,159501,159548,159618,159818,159819,159832,159853,159856,159867,159869,159902,1