Permalink
Browse files

Disable debugP by default.

You won't believe how much performance this beast costs. It is at least
some 10% of average speed.
  • Loading branch information...
1 parent 2fc78b6 commit 01fdc840f12977e901d7b2cb57270f4de835ef18 @jlouis committed May 27, 2010
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/Process.hs
View
@@ -103,7 +103,11 @@ logP prio msg = do
infoP, debugP, criticalP, warningP, errorP :: Logging a => String -> Process a b ()
infoP = logP INFO
+#ifdef NDEBUG
+debugP _ = return ()
+#else
debugP = logP DEBUG
+#endif
criticalP = logP CRITICAL
warningP = logP WARNING
errorP = logP ERROR

0 comments on commit 01fdc84

Please sign in to comment.