<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Matthias Günther on Medium]]></title>
        <description><![CDATA[Stories by Matthias Günther on Medium]]></description>
        <link>https://medium.com/@wikimatze?source=rss-37ddd863a9cd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*7IbHRPeoTGFeB3s1gnD25w.jpeg</url>
            <title>Stories by Matthias Günther on Medium</title>
            <link>https://medium.com/@wikimatze?source=rss-37ddd863a9cd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 20:30:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@wikimatze/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Making Firefox as Fast as Chrome]]></title>
            <link>https://medium.com/@wikimatze/making-firefox-as-fast-as-chrome-d7b5f8d79e52?source=rss-37ddd863a9cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/d7b5f8d79e52</guid>
            <category><![CDATA[firefox]]></category>
            <category><![CDATA[wikimatze]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Matthias Günther]]></dc:creator>
            <pubDate>Wed, 28 Dec 2016 14:22:28 GMT</pubDate>
            <atom:updated>2016-12-28T14:22:28.117Z</atom:updated>
            <content:encoded><![CDATA[<p>Making Firefox as Fast as Chrome</p><p><em>Learn in this article how you can make Firefox as fast as Chrome again.</em></p><p>I can remember that in the past some coworker says to me: “Why are you using Firefox and not the faster Chrome?” Hmm, I have always been using Firefox and never saw a reason why to use another browser. But I installed Chrome, it feels faster, and it consumes less CPU and memory of my system. The ecosystem and the look and feel is typical for a Google product: It works, is intuitive, and you know it works. It is not difficult to sync your bookmarks, settings, prefill forms, and even passwords =&gt; just everybody has nowadays a <a href="https://mail.google.com/">gmail</a> account and this is how all the magic works.</p><p>But being a German, it always felt wrong to send Google information about my web experience, which buttons I press, what plugins I use and so on. Since I’m a big Vim fan I heard of a plugin called <a href="https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb?hl=en">Vimium</a> which enables keyboard shortcuts for navigating webpages without using the mouse, I installed it but was not really happy with it because it hasn’t all the shortcuts I really want and it was difficult to create custom mappings, as well as handling bookmarks. Than during a <a href="http://vimberlin.de/">vimberlin meetup</a> I saw <a href="https://twitter.com/andrewradev">@andrewradev</a> using <a href="http://www.vimperator.org/vimperator">Vimperator</a> and it was a blast: He was very fast and doing all the things I wanted but never could do with Vimium. That was a turning point to give Firefox a new chance. I spent one weekend to learn most of Vimperators shortcuts and create a <em>vimperatorrc</em>.</p><p>But than came the release of <a href="http://xubuntu.org/news/saucy-salamander-final/">Xubuntu 13.10</a> and I installed a fresh new system …</p><h3>Slow Firefox</h3><p>After everything was installed and I was ready to use the new system. Starting Firefox was a nightmare, everything is slow. Thanks to my friend <a href="https://twitter.com/jcavena">@jcavena</a> from Kansas City — he gave me starting point to solve this issue and not spending more hours on it:</p><blockquote><a href="https://twitter.com/wikimatze"><em>@wikimatze</em></a><em> how many plugins on Firefox vs chrome?</em></blockquote><blockquote><em>— JC (@jcavena) </em><a href="https://twitter.com/jcavena/statuses/392387457745821696"><em>October 21, 2013</em></a></blockquote><p>I didn’t had any plugins, only the basic installation with the default settings. I spend the evening fiddling around with the settings, tried this and that, checked my Internet connection, but all what I did was senseless. Firefox was loading 2000 times slower than Chrome. But don’t give up in such situations, just clear your mind and think about what you want solve.</p><h3>Fast Firefox</h3><p>I stick around the Internet and found the about:config setting in Firefox (it&#39;s nearly the same when you call the chrome://settings/ URL in Chrome but has more options). This is the place where you can change security, stability, and performance. That what I was searching for and this is the place you can&#39;t find in the normal graphical settings of Firefox. There you can see a list preferences names with either string, integer, or boolean values. Than I stumbled upon the network.dns.disableIPv6 option. There is an error in IPv6-capable DNS servers where an IPv4 address is returned although an IPv6 was requested. Firefox can recover from this error but due to lack of performance. So my solution was to setting this option to true.</p><h3>Reduce Firefox Memory and Cache Usage</h3><p>Next, create the <a href="http://kb.mozillazine.org/Config.trim_on_minimize">config.trim<em>on</em>minimize</a> as a boolean value and set it’s value to true. This will swap out memory when the program is minimized.</p><p>If you have enough memory, you can set the <a href="http://kb.mozillazine.org/Browser.cache.disk.enable">browser.cache.disk.enable</a> and the <a href="http://kb.mozillazine.org/Browser.cache.memory.enable">browser.cache.memory.enable</a> value to false.</p><h3>Pipelining</h3><p>Set the values of <a href="http://kb.mozillazine.org/Network.http.pipelining">network.http.pipelining</a> and <a href="http://kb.mozillazine.org/Network.http.proxy.pipelining">network.http.proxy.pipelining</a> to true. Next set the value <a href="http://kb.mozillazine.org/Network.http.pipelining.maxrequests">network.http.pipelining.maxrequests</a> to 8. This in combination with the pipelining options, Firefox will send 8 requests to a page and this results in a faster load of the page.</p><p>Create the new value <a href="http://kb.mozillazine.org/Nglayout.initialpaint.delay">nglayout.initialpaint.delay</a> with the value of 0. This will load a page initially but take longer till the whole page is rendered. Normally, Firefox renders web pages incrementally, it displays what’s been received before the entire page has been downloaded.</p><h3>Fast Rendering</h3><p>Create the new value <a href="http://kb.mozillazine.org/Content.notify.interval">content.notify.interval</a> to 500000. This preference specifies the minimum amount of time to wait between reflows to 1/2 of a second. Lowering the interval will lower the perceived page loading time but increase the total loading time. To make use of the content.notify.interval setting you need to add the boolean setting <a href="http://kb.mozillazine.org/Content.notify.ontimer">content.notify.ontime</a> to true. This means that pages are not reflowed at an interval any higher than that specified by the content.notify.interval.</p><h3>Frequency Mode</h3><p>Create the new value <a href="http://kb.mozillazine.org/Content.switch.threshold">content.switch.threshold</a> and set it to 250000. When a page is loaded, there is a high frequency and low frequency level. The high frequency mode is active when the user moves the mouse or uses the keyboard — so it allows higher UI responsiveness. On the other hand, the low frequency mode is on, when the user is reading the page. Raising the value will make the application more responsive at the expense of page load time. In order to make use of this option, you need to create the new value <a href="http://kb.mozillazine.org/Content.interrupt.parsing">content.interrupt.parsing</a> and set it to false. Parsing a page will not be interrupted by user and the page is loaded faster. But that means, that the application is unresponsive until the parsing the site is complete.</p><h3>Session History Entries</h3><p>Set the browser.sessionhistory.max_entries to 5 - you won&#39;t surf more than 5 of the websites we previously surfed before, and there is really no need to store more than that in the session.</p><h3>Increase Page Loading</h3><p>Next, create the new value <a href="http://kb.mozillazine.org/Nglayout.initialpaint.delay">nglayout.initialpaint.delay</a>, chose a new integer type and set the value to 0. This will speed up page loading by intentionally telling Firefox to avoid waiting during certain parts of page loading.</p><h3>Further Improvements</h3><p>The following improvements are based on <a href="http://www.gheorghesarcov.ga/">Gheorghe Sarcov</a>.</p><ul><li>Set browser.display.show_image_placeholders to false - this stops the display of placeholders while images are loading to speed up the page</li><li>Set browser.tabs.animate to false - this disables all tab animation features (e.g. when you click the ‘New Tab’ (+) button) to make the tab interface feel quicker.</li><li>Set <a href="http://kb.mozillazine.org/Network.prefetch-next">network.prefetch-next</a> to true — this setting can automatically prefetch (load) the contents of pages linked to by the page you are viewing e.g. to load the homepage in the background, making it quicker for you to view next if you want to.</li></ul><h3>Final Thoughts</h3><p>There is not the perfect setup here for everyone. You can type in about:cache?device=memory and see your current number of entries, maximum storage size, storage in use and inactive storage. Chrome make better use of a modern multi-core CPU, as described under <a href="http://www.howtogeek.com/165264/heres-why-firefox-is-still-years-behind-google-chrome/">howtogeek.com</a> - where Firefox uses a single-process architecture.</p><p><em>Originally published at </em><a href="http://wikimatze.de/making-firefox-as-fast-as-chrome"><em>wikimatze.de</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7b5f8d79e52" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[This article is part of an ongoing series about my exploration of the Padrino web framework. If you…]]></title>
            <link>https://medium.com/@wikimatze/this-article-is-part-of-an-ongoing-series-about-my-exploration-of-the-padrino-web-framework-if-you-6a5c95a31c2c?source=rss-37ddd863a9cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a5c95a31c2c</guid>
            <dc:creator><![CDATA[Matthias Günther]]></dc:creator>
            <pubDate>Mon, 28 Jul 2014 18:03:08 GMT</pubDate>
            <atom:updated>2014-07-28T18:03:08.092Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This article is part of an ongoing series about my exploration of the Padrino web framework. If you want to read more about it please check out </em><a href="http://padrinobook.com/"><em>padrinobook.com</em></a><em>. You sniff around in the sources of the book under </em><a href="https://github.com/matthias-guenther/padrino-book"><em>GitHub</em></a><em>.</em></p><h4>Learn more about Padrino Book? Sign Up!</h4><p>As long as your application exists, some developers leave others will join. It’s good to have some metrics about certain code smells. A code smell is part of your source code which may be the root of a design problem but is not actually a bug. It’s good to have some tools to be “lord of the smells” for <a href="http://www.padrinorb.com/">Padrino</a> — don’t let smells lower the quality of your project.</p><p>(Note: This post is tested with <a href="http://www.padrinorb.com/blog/padrino-0-12-0-activesupport-4-rewritten-reloader-smarter-rendering-and-loads-more">padrino 0.12.2</a>, <a href="https://github.com/colszowka/simplecov">simplecov 0.9</a>, <a href="https://github.com/metricfu/metric_fu/">metric_fu 4.11.1</a>, and <a href="https://www.ruby-lang.org/en/news/2013/09/23/ruby-2-1-0-preview1-is-released/">ruby 2.1.2p95</a>)</p><h2>Available Tools</h2><p>I will go through the following tools and will explain how you can use them.</p><ul><li><a href="https://github.com/colszowka/simplecov">simplecov</a>: It will automatically detect the tests you are using Rubies 1.9&#39;s <a href="http://www.ruby-doc.org/stdlib-1.9.3/libdoc/coverage/rdoc/Coverage.html">built-in Coverage library</a> to gather code coverage data.</li><li><a href="https://github.com/metricfu/metric_fu/">metric_fu</a>: Creates churn, code smells, and other coverage tools that generate reports about your code.</li><li><a href="https://codeclimate.com/">codeclimate.com</a>: Online tool for measuring quality and security for your application.</li></ul><h2>Simplecov</h2><p>Add the gem to your Gemfile:</p><pre>gem ‘simplecov’</pre><p>Next, I want to start the code coverage generation every time I run the tests. So we need to add the following line to the spec_helper.rb:</p><pre>require ‘simplecov’<br>SimpleCov.start</pre><p>And that’s all. Next time when you run the tests you can detect lines with the following output:</p><pre>Coverage report generated for RSpec to ~/git/job-vacancy/coverage. 209 / 252 LOC (82.94%) covered.<br>/</pre><p>After all tests have been passed, you can see the output in the coverage/index.html file:</p><p>Simplecover overview without any special configuration</p><p>Clicking on a single class will give you a brief overview which lines are not tested</p><p>It is also possible to divide parts of your application into several groups. Add options to the Simplecov.start block:</p><pre>SimpleCov.start do<br> add_group “Models”, “app/models”<br> add_group “Controllers”, “app/controllers”<br> add_group “Helpers”, “app/helpers”<br> add_group “Mailers”, “app/mailers”<br>end</pre><p>Simplecov — a more structured view of different components</p><h2>metric_fu</h2><p>Add the following line to your Gemfile:</p><pre>gem ‘metric_fu’</pre><p>When this is done you need to start the metric_fu command from your commandline:</p><pre>$ ~/git/job-vacancy: metric_fu<br>******* STARTING METRIC reek<br>******* ENDING METRIC reek<br>******* STARTING METRIC flog<br>******* ENDING METRIC flog<br>******* STARTING METRIC flay<br>******* ENDING METRIC flay<br>******* STARTING METRIC saikuro<br>******* ENDING METRIC saikuro<br>******* STARTING METRIC roodi<br>******* ENDING METRIC roodi<br>******* STARTING METRIC cane<br>******* ENDING METRIC cane<br>******* STARTING METRIC churn<br>******* ENDING METRIC churn<br>******* STARTING METRIC stats<br>******* ENDING METRIC stats<br>******* STARTING METRIC hotspots<br>******* ENDING METRIC hotspots<br>******* SAVING REPORTS<br>******* GENERATING GRAPHS<br>*****Generating graphs<br>*****Generating graphs for tmp/metric_fu/_data/20140318.yml<br>all done</pre><p>It will generate a tmp/metric_fu directory with the following contents:</p><pre>tmp/metric_fu<br>├── _data<br>│   └── 20140318.yml<br>├── output<br>│   ├── app_app.rb.html<br>│   ├── app_controllers_page.rb.html<br>│   ├── app_controllers_sessions.rb.html<br>│   ├── app_controllers_users.rb.html<br>│   ├── app_helpers_page_helper.rb.html<br>│   ├── app_helpers_sessions_helper.rb.html<br>│   ├── app_helpers_users_helper.rb.html<br>│   ├── app_mailers_confirmation.rb.html<br>│   ├── app_mailers_registration.rb.html<br>│   ├── app_models_job_offer.rb.html<br>│   ├── app_models_user_observer.rb.html<br>│   ├── app_models_user.rb.html<br>│   ├── app_views_application.erb.html<br>│   ├── app_views_users_edit.erb.html<br>│   ├── app_views_users_new.erb.html<br>│   ├── bluff-min.js<br>│   ├── cane.html<br>│   ├── cane.js<br>│   ├── churn.html<br>│   ├── excanvas.js<br>│   ├── flay.html<br>│   ├── flay.js<br>│   ├── flog.html<br>│   ├── flog.js<br>│   ├── Gemfile.html<br>│   ├── Gemfile.lock.html<br>│   ├── hotspots.html<br>│   ├── index.html<br>│   ├── js-class.js<br>│   ├── lib_tasks_auth_token_attribute.rake.html<br>│   ├── reek.html<br>│   ├── reek.js<br>│   ├── roodi.html<br>│   ├── roodi.js<br>│   ├── saikuro.html<br>│   ├── spec_app_controllers_users_controller_spec.rb.html<br>│   ├── stats.html<br>│   └── stats.js<br>├── report.yml<br>└── scratch<br> └── churn<br> └── 873660ae5973b77b09c47d1dcf03577222095d6e.json</pre><pre>4 directories, 41 files</pre><p>The following metrics are created by</p><p>cane can be used if code quality thresholds are met.</p><p>churn measures the change ratio of files and you can use this indicator to have more code review, refactoring, more tests for this <strong>beast of a file.</strong></p><p>flog a high flog score is an indicator for code complexity.</p><p>flay analyzes code similarities in your code base — good way to stay clean with <a href="http://en.wikipedia.org/wiki/Don%27t_repeat_yourself">DRY</a>.</p><p>reek checks your classes and modules after code smells. Under the <a href="https://github.com/troessner/reek/wiki/Code-Smells">reek wiki</a> you can find all code smells and what they actually mean.</p><p>hotspot a gathering of the flog, flay and reek score of the files in your application.</p><p>roodi scans your code and informs you about design issues you may have.</p><p>saikuro generates a list of cyclomatic complexity of each method found in your application.</p><h2>Code Climate</h2><p>Go to the website <a href="https://codeclimate.com/">codeclimate.com</a> and register. Once you are logged, you can add any ruby related open source project for free.</p><p>It will take a while till the metrics are generated for your application:</p><p>But when it’s ready, you get a nice overview:</p><p>Or a more detailed overview of single classes:</p><p>Detailed information about a single file in Code Climate</p><h4>Learn more about Padrino Book? Sign Up!</h4><p>Hierarchy: <a href="http://wikimatze.de/highlight-bad-words-in-vim">previous post</a></p><p>© Matthias Günther • <a href="http://feeds.feedburner.com/guenther">• </a>• • • <a href="http://wikimatze.de/reading.html">reading</a> • <a href="http://wikimatze.de/projects.html">projects</a> • <a href="http://wikimatze.de/imprint.html">imprint</a> • <a href="http://wikimatze.de/talks.html">Talks</a> • <a href="http://wikimatze.de/colophon.html">colophon</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a5c95a31c2c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>