File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,17 @@ protected function parseItem(array $item)
136136 if (strpos ($ item ['uri ' ], 'https://www.heise.de ' ) !== 0 ) {
137137 return $ item ;
138138 }
139+
140+ // These cause memory leaks in simple_html_dom
141+ $ skipped = [
142+ 'https://www.heise.de/bestenlisten/testsieger/top-10-der-beste-mini-pc-mit-windows-11-im-test-amd-ryzen-dominiert/6cybv8w ' ,
143+ 'https://www.heise.de/bestenlisten/testsieger/top-10-der-beste-maehroboter-ohne-begrenzungskabel-mit-kamera-gps-oder-lidar/gb7xhbg ' ,
144+ ];
145+ if (in_array ($ item ['uri ' ], $ skipped )) {
146+ $ this ->logger ->debug (sprintf ('skip: %s ' , $ item ['uri ' ]));
147+ return $ item ;
148+ }
149+
139150 // abort on heise+ articles
140151 if ($ sessioncookie == '' && str_starts_with ($ item ['title ' ], 'heise+ | ' )) {
141152 $ item ['uri ' ] = 'https://archive.is/ ' . $ item ['uri ' ];
@@ -152,6 +163,11 @@ protected function parseItem(array $item)
152163 $ item = $ this ->addArticleToItem ($ item , $ article );
153164 }
154165
166+ $ article ->clear ();
167+
168+ // Manually trigger gc to reduce memory usage
169+ gc_collect_cycles ();
170+
155171 return $ item ;
156172 }
157173
You can’t perform that action at this time.
0 commit comments