summaryrefslogtreecommitdiff
path: root/docs/designdefense.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-11-13 07:13:18 +0000
committerChris McDonough <chrism@agendaless.com>2009-11-13 07:13:18 +0000
commit93f694d88a67b131ee01dd66715cfb4f7afa0cd9 (patch)
treed2f483e38d938b6073f9c82dd4f46ffa46f65427 /docs/designdefense.rst
parent4b32c82e0b1ca186b26b530ce83374c34b2aaa0e (diff)
downloadpyramid-93f694d88a67b131ee01dd66715cfb4f7afa0cd9.tar.gz
pyramid-93f694d88a67b131ee01dd66715cfb4f7afa0cd9.tar.bz2
pyramid-93f694d88a67b131ee01dd66715cfb4f7afa0cd9.zip
Cheating.
Diffstat (limited to 'docs/designdefense.rst')
-rw-r--r--docs/designdefense.rst33
1 files changed, 24 insertions, 9 deletions
diff --git a/docs/designdefense.rst b/docs/designdefense.rst
index b0753c2ad..43231a811 100644
--- a/docs/designdefense.rst
+++ b/docs/designdefense.rst
@@ -594,8 +594,8 @@ BFG Has Too Many Dependencies
This is true. The total number of packages (at the time of this
writing) that :mod:`repoze.bfg` depends upon transitively is 17. This
-is a lot more than zero dependencies, about which some microframeworks
-boast.
+is a lot more than zero dependencies: a metric which some
+"microframeworks" (and Django) boast of.
The :mod:`zope.component` and :mod:`zope.configuration` packages on
which :mod:`repoze.bfg` depends have transitive dependencies on
@@ -611,17 +611,32 @@ collapse (or at least untangle) some of these dependencies.
several other repoze packages.
It should be noted that :mod:`repoze.bfg` is positively lithe compared
-to :term:`Zope` or :term:`Grok` (which have, in their most common
-configurations, roughly 118 dependencies), and has a number of package
-dependencies comparable to other similar frameworks such as Pylons.
-We try not to reinvent too many wheels, and this comes at a cost. The
-cost is some number of dependencies.
+to :term:`Zope` or :term:`Grok` which have, in their most common
+configurations, roughly 118 dependencies. :mod:`repoze.bfg` has a
+number of package dependencies comparable to other similar frameworks
+such as Pylons. We try not to reinvent too many wheels (at least the
+ones that don't need reinventing), and this comes at a cost. The cost
+is some number of dependencies.
However, "number of packages" is just not a terribly great metric to
measure complexity. For example, the :mod:`zope.event` package on
which :mod:`repoze.bfg` depends has a grand total of four lines of
-code (see above, we're continually trying to agitate for a collapsing
-of packages).
+code. As noted above, we're continually trying to agitate for a
+collapsing of packages like this.
+
+BFG "Cheats" To Obtain Speed
+----------------------------
+
+Complaints have been lodged by other web framework authors at various
+times that :mod:`repoze.bfg` "cheats" to gain performance. One
+claimed cheating mechanism is our use (transitively) of the C
+extensions provided by :term:`zope.interface` to do fast lookups.
+Another claimed cheating mechanism is the religious avoidance of
+extraneous function calls.
+
+If there's such a thing as cheating to get better performance, we want
+to cheat as much as possible. This is otherwise known as
+optimization.
Other Topics
------------