{"id":1259,"date":"2012-05-09T23:24:19","date_gmt":"2012-05-09T21:24:19","guid":{"rendered":"http:\/\/raftaman.net\/?p=1259"},"modified":"2021-05-15T11:46:39","modified_gmt":"2021-05-15T09:46:39","slug":"okular-uses-ridiculous-amount-of-memory","status":"publish","type":"post","link":"https:\/\/possiblelossofprecision.net\/?p=1259","title":{"rendered":"Okular uses ridiculous amounts of memory"},"content":{"rendered":"<p>Especially on large pdf files, okular tends to occupy insane amounts of memory. That&#8217;s because already rendered pages are kept in the cache for faster revisit and as you scroll quickly through a large pdf (let&#8217;s assume a couple hundred pages), okular can easily occopy Gigabytes of RAM for a few MB sized pdf file.<\/p>\n<p>The problem is existing for quite a while and a couple of version now and there is even a <a href=\"https:\/\/bugs.kde.org\/show_bug.cgi?id=291129\">bug report<\/a> in the kde bug tracker. As a <strong>quick fix<\/strong>, I would simply suggest to lower okular&#8217;s <strong><em>MemoryLevel<\/em><\/strong>. Modern processors usually render regular pages (eBooks, datasheets, application notes etc.) almost instantly and as long as you don&#8217;t mess around with technical drawings or other render-intensive stuff inside the pdf, there is really no reason to use heap space that aggressively.<\/p>\n<p>You can either use the GUI (<strong>Settings &rarr; Configure Okular&#8230; &rarr; Performance &rarr; Memory Usage<\/strong>) to the the <strong><em>Memory Usage<\/em><\/strong> to <strong><em>&#8220;Low&#8221;<\/em><\/strong>, <\/p>\n<div id=\"attachment_1260\" style=\"width: 560px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/possiblelossofprecision.net\/wordpress\/wp-content\/uploads\/2012\/05\/ScreenshotOkularMemoryUsage.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1260\" src=\"https:\/\/possiblelossofprecision.net\/wordpress\/wp-content\/uploads\/2012\/05\/ScreenshotOkularMemoryUsage-550x455.png\" alt=\"ScreenshotOkularMemoryUsage\" title=\"ScreenshotOkularMemoryUsage\" width=\"550\" height=\"455\" class=\"size-medium wp-image-1260\" srcset=\"https:\/\/possiblelossofprecision.net\/wordpress\/wp-content\/uploads\/2012\/05\/ScreenshotOkularMemoryUsage-550x455.png 550w, https:\/\/possiblelossofprecision.net\/wordpress\/wp-content\/uploads\/2012\/05\/ScreenshotOkularMemoryUsage.png 794w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/a><p id=\"caption-attachment-1260\" class=\"wp-caption-text\">Change &quot;Memory Usage&quot; to &quot;Low&quot; to prevent caching (click for full size image)<\/p><\/div>\n<p>or change the <strong><em>MemoryLevel<\/em><\/strong> variable in <strong><code>.kde\/share\/config\/okularpartrc<\/code><\/strong> to &#8220;Low&#8221;. If the variable (or the <code>Dlg Performance<\/code>-Section) doesn&#8217;t exist, simply create it.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n&#x5B;Dlg Performance]\r\nMemoryLevel=Low\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Especially on large pdf files, okular tends to occupy insane amounts of memory. That&#8217;s because already rendered pages are kept in the cache for faster revisit and as you scroll quickly through a large pdf (let&#8217;s assume a couple hundred pages), okular can easily occopy Gigabytes of RAM for a few MB sized pdf file. The problem is existing for&#8230; <a href=\"https:\/\/possiblelossofprecision.net\/?p=1259\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[45],"class_list":["post-1259","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-kde"],"_links":{"self":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/1259","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1259"}],"version-history":[{"count":24,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/1259\/revisions"}],"predecessor-version":[{"id":2199,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/1259\/revisions\/2199"}],"wp:attachment":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1259"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1259"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}