Introduction About Site Map

XML
RSS 2 Feed RSS 2 Feed
Navigation

Main Page | Blog Index

Sunday, March 16th, 2014, 8:42 pm

Stallman Accepts Twitter

TechBytes with Stallman

Direct download as Ogg

Summary: Dr. Richard Stallman, the Free Software Foundation’s founder, talks about so-called ‘social’ media sites other than Facebook


Made entirely using Free/libre software, heavily compressed for performance on the Web at quality’s expense

Sunday, March 16th, 2014, 9:49 am

Aggregating JavaScript Files in Drupal

Background

In Drupal, provided that the required modules are installed, performance can be improved in a variety of ways. Aggregating and compressing CSS files can decrease page rendering time (getting the required files more quickly prior to rendering) and the same goes for JavaScript, which executes programs while the page is loading or after it is loaded.

Configuration

To minimise the number of GET operations and the size of transmitted files we can go to Configuration -> Development -> Performance. Therein there are many options, cache related ones in particular. Under Bandwidth Optimisation there are two relevant options which are not yet used.

  • One option is “Aggregate and compress CSS files.
  • The other is “Aggregate JavaScript files.

We enable the second option only, then press the “Save Configuration” button.

HTTP Headers

Before the above change is applied, however, we should probe to see what JavaScript are associated with some sample pages and how they are delivered to the visitor. The Firefox Live HTTP Headers plugins can help here. It is available from Mozilla’s official extensions repository; version 0.17 is the latest (this extension is nearly a decade old and it was widely popular half a decade ago). Once installed, Firefox needs to be restarted, whereupon the extension can be invoked, from the bottom of the “Tools” menu, under “Live HTTP headers”. Load the main page of the site (or any other page for that matter) and analyse the output. “Capture” is enabled by default.

Press “Save All” to save the output to a file. This will be used to compare the number of files before and after the change.

Close Live HTTP headers (the window).

Apply the optimisation changes (as above, ensure the green box says “Your configuration options have been saved.”) and repeat the process again, this time choosing “Save All” and choosing another filename.

Before/After Analysis

Open a text editor and start comparing the files. Suffice to say, if there are issues loading pages after applying the above change, then stop and investigate. A more thorough investigation (beyond ensuring the settings have a positive effect) will come later.

If aggregation works correctly, expect to see in the second (“after”) file that the JavaScript GET request is for /sites/default/files/js/js_[SOME_LONG_CODE].js, not something with “modules”. This means that a new cache-esque file was generated which combines several others. Drupal saves it on disk for performance improvements.

Open the “Live HTTP headers” again, ensuring the log is empty. Reload the same page and scroll up to the same point, ensuring the same JavaScript is pulled from cache again. If the file name is not identical (in its name/size), then it is possible that it got regenerated, which may slow down the server side but not the client side (except when waiting for it to be regenerated); network speed — even if files are concurrently downloaded — should not be an issue here, so it may be good enough. The important thing is that we can verify JavaScript got aggregated.

Generally speaking, another sanity check can be comparison of file sizes of the file ‘dumps’ Live HTTP headers. For the main page of one test site, the “before” file is 131KB in size, whereas the “after” file is 106KB in size. This indicates that a lot less was included in GET requests; getting pertinent details (like which requests were spared) is a more time-consuming exercise.

Site Integrity Tests

At this stage, systematic site tests are needed, especially in pages that are JavaScript-heavy and may be affected by JavaScript functions being thrown into the same file. Among the pages tested (not a full list):

  • Front page
  • Contact page

This would of course depend on the site at hand.

JavaScript Console

In Mozilla’s Firefox Web site, navigate to Web Developer’s Toolbox, “javascript” under common tags has JavaScript Debugger. Install it (Add to Firefox, Install Now, Restart Now).

Once the browser has the debugger installed and enabled run through a few pages while the console is visible to identify any issues which remain. File -> Open Web Location is another option. Once all is clear and there are no major errors (if any errors at all) it seems ready for permanent switchover to this operation mode.

Sunday, March 16th, 2014, 9:39 am

Record Month for Schestowitz.com

2014 stats

I DON’T profess to know exactly what attracts people to this personal site, but the site is very broad, with over 100,000 Web pages that I have produced over the years. Although I hardly update this Web site anymore, it continues to serve many hits and uses up almost 40 gigabytes of bandwidth per month. It is still a lot less than what Tux Machines and Techrights are serving, especially via Varnish. In the next post I will provide a site performance (bandwidth) tip for Drupal. When sites get very large this becomes imperative for keeping costs down.

Monday, March 10th, 2014, 8:26 am

Richard Stallman and ownCloud

TechBytes with Stallman

Direct download as Ogg

Summary: Dr. Richard Stallman, the Free Software Foundation’s founder, talks about storage in so-called “clouds”


Pardon the error (I made an error by referring to ownCloud as “myCloud”).

Made entirely using Free/libre software, heavily compressed for performance on the Web at quality’s expense

Monday, March 3rd, 2014, 10:02 pm

Richard Stallman on Facebook

TechBytes with Stallman

Direct download as Ogg

Summary: Dr. Richard Stallman, the Free Software Foundation’s founder, talks about how Facebook is using people and why no person should support Facebook


Made entirely using Free/libre software, heavily compressed for performance on the Web at quality’s expense

Friday, February 28th, 2014, 5:19 pm

NatWest Probably the Worst Bank in the UK

“Bad service” the understatement of this decade

NatWest (National Westminster, part of the Royal Bank of Scotland) used to be pretty good, but it became absolutely terrible a few years ago, not just for customers but also for staff (what’s left of the staff that’s qualified). There were systemic changes that were covered here before. Earlier this year it was the last straw (much had happened beforehand) and we decided to ditch the bank. We decide to transfer all the money elsewhere after they had made many mistakes. But it’s not easy. Even then they make a mistake (not passing all the money, forgetting to pay interest) and later, only upon visiting the bank again, they finally admitted their error and then refused to issue a letter that would enable us to ask the new bank to compensate us for NatWest making its mistake. Basically, NatWest had an innocent party, Nationwide, blamed in vain and it caused hours of painful work and nuisance (for all sides which were innocent victims). But wait, it gets worse. NatWest then closed the account and forgot or failed to send a closing statement. How can a bank be so incompetent? Many arguments were needed to make a resolution reachable and no resolution has been reached yet. It’s chaos because the staff if not skilled enough to deal with the scenario. This is just typical NatWest as of recent years. The staff member there don’t know what the heck they are doing.

It is worth adding that NatWest still advertises in many pamphlets everywhere that it is saying “yes” to almost every loan request, gloating about accepting 90% of applications, essentially gambling with savers’ money by giving it to people who cannot pay back. This is a recipe for bankruptcy (or taxpayers-paid bailout), especially when banks are allowed to lend around 10 times the amount they actually possess. This is corruption.

In summary, NatWest is a terrible bank these days and those who try to leave it may find that even upon departure the bank is unable do work properly. A lot of problems can be spared and avoided if one quits NatWest or never joins them to begin with. Learn from other people’s repeatedly-horrible experience. My friends who are with NatWest say the same about the bank.

Sunday, February 23rd, 2014, 8:29 pm

Richard Stallman on Social Networks

TechBytes with Stallman

Direct download as Ogg

Summary: Dr. Richard Stallman, the Free Software Foundation’s founder, talks about the RMS account at Identi.ca and more


Worth noting: After our last interview release (about Diaspora) someone created an RMS account at JoinDiaspora, echoing what already exists in Ideni.ca and Stallman.org

Made entirely using Free/libre software, heavily compressed for performance on the Web at quality’s expense

Real-time Posts



Retrieval statistics: 24 queries taking a total of 0.438 seconds • Please report low bandwidth using the feedback form
Original styles created by Ian Main (all acknowledgements) • PHP scripts and styles later modified by Roy Schestowitz • Help yourself to a GPL'd copy
|— Proudly powered by W o r d P r e s s — based on a heavily-hacked version 1.2.1 (Mingus) installation —|