Reduce memory requirements
nijel opened this issue · 5 comments
Rendering report with about 5000 incidents currently consumes about 200 MB on the server to generate. This should be reduced.
Example of such report: https://reports.phpmyadmin.net/reports/view/18227
For me, this issue is even worse, that page consuming about 1.5 GB of memory (or that's what Chrome reports) after scrolling through it a little bit.
How should this problem be handled?
- Use some technique like lazy loading.
- Split the incidents in multiple pages (50 per page or so)
- Group stacktraces that are almost the same. It is hard to define "almost" so this might create more issues by grouping stack traces that are hardly related or not grouping any stack traces because they differ too much.
I was talking about server side memory consumption, on the client side it's huge as well :-).
My Safari ended hanging up on first time. I think we should split up incidents as @udan11 suggested so that such reports do not consume 200MB directly to generate this report and also there will be no need to scroll to bottom to view graphs
I believe that the two issues (client-sided and server-sided) are related.
Even with PHP memory limit set to 512MB, some issues fail to render, for example:
https://reports.phpmyadmin.net/reports/view/26036
Error is:
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 8192 bytes) in /home/reports/error-reporting-server/vendor/cakephp/cakephp/src/Database/Statement/PDOStatement.php on line 97