Closed sorin-ionescu closed 12 years ago
At first glance I suspect your profile output may have been truncated somehow, the times seem to be way off.
I suppose, most of my annoyance was when opening browser tabs.
That is fixed in 0.13.0. It will also format your code blocks a lot nicer than 0.12.0 ;)
Yes, it was truncated. I have fixed it.
Misaka requires Cython?
Downloading/unpacking misaka
Downloading misaka-1.0.0.tar.gz (56Kb): 56Kb downloaded
Running setup.py egg_info for package misaka
Cython is not installed. Please install Cython first.
I had some trouble compiling it with llvm-gcc-4.2, but I got it to work.
Misaka requires Cython?
Yes. Upstream has workaround for people using pip
, and have released 1.0.1. This should no longer be an issue.
As for speed, I'm not convinced there is a whole lot to be gained. There are no glaringly obvious problems, and adding a heap of micro-optimisations will make maintenance far harder. For example, even resorting to import-on-use for the possibly unused template filters only shaves off ~0.05 seconds at the expense of horrific __import__
hacks.
There are some semi-obvious ways to speed up single bug displays. If you're willing to put up with bare unformatted markdown and patches without highlighting, see https://gist.github.com/1770350. We're still only talking about a less than a tenth of second improvement though.
I'm going to look a little deeper, I may well have missed something.
Given that the obvious savings available are so close to zero as to almost be indistinguishable I'm closing this. I'm really not interested in piling in micro-optimisations when they'll still be totally overshadowed by the network roundtrips.
Note to future readers: If I've missed something obvious please open a pull request and shame me ;)
As you have asked in #20, I have run curl to compare it with hubugs and also run cProfile on both commands. I have used an empty cache each time. It's about 1.5 seconds slower than curl in each case, which is not too bad. I suppose, most of my annoyance was when opening browser tabs.