Concurrent Processing In Pelican

Pelican’s performance in rendering large blogs can be accelerated by transforming articles to HTML in parallel. For Markdown and restructured text (reST) I provide numbers and sample code here.

To explore the timings we need rather extensive samples of texts. On github we find a repository of German law ...

more ...

New Exception Hierarchy In Python 3.3+

Working with the new stable version of Python 3.3, I stumbled upon the new exception hierarchy. Specifically, I was working on some file-related routines and found in the release notes, that for this domain a new set of exceptions is introduced and that IOError is now OSError.

Things are ...

more ...

Copying Data Structures Quirks

Note

TL;DR — Copying fails if a value is an iterator.

To create a duplicate of a data structure, Python provides methods copy() and deepcopy(). Lately, I wanted to duplicate a nested structure with deepcopy() and encountered following issue:

TypeError: object.__new__(dict_keys) is not safe, use dict_keys.__new__()

And ...

more ...

High Performance Python: Profiling

Note

This article is part of an ongoing series about profiling Python programs that starts here [4].

Note

This text is a draft and may be subject to changes.

There are two things we can profile, execution time and memory consumption.

Profiling Execution Time, Part I

From the Linux command ...

more ...

The Fighty Engine

Note

This article is part of an ongoing series about profiling Python programs that starts here. You may skip this article if you are only interested in profiling, and not in the game details.

The player character of a typical RPG has a set of attributes which describe her stats ...

more ...