diff options
author | Yorhel <git@yorhel.nl> | 2010-11-26 22:00:41 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2010-11-26 22:09:40 +0100 |
commit | 5a74f0fe0564807657ced8e9773075c2391c5cce (patch) | |
tree | 9d42be7ab9460afc3d861917031697bc5b1b74a5 /ChangeLog | |
parent | ad17aecae0c2c947ab33edc4e616b120f8761042 (diff) |
VNDBUtil: Partly rewrote bb2html() to be faster and better
It does not use split() anymore, the input string is parsed in a single
pass using a global regex. It's now a lot faster on larger input. The
page generation time of /t937 went back from ~350ms to ~55ms (on the
beta, the production server is slower).
Also made several tiny improvements while I was at it:
- multiple successive newlines aren't removed within [code]
- truncating a message with $maxlength also removes trailing
spaces and interpunction
- multiple successive spaces are removed outside of [code] (and thus
don't count towards the length of the message)
The function should be mostly equivalent in regards to all other things,
ignoring a few minor border cases that weren't documented in the first
place. The URL regex (and the idea of a global regex) came from bpaste:
http://g.blicky.net/bpaste.git/commit/?id=ac7b16d0ec0f195d00a0a79698f67c3010e8cf7d
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -6,8 +6,9 @@ - JS: Reverted to the old selection box date selector - JS: Split script.js into a separate file for each language - Improved performance of update_vnpopularity() on PostgreSQL 9.0 + - Faster and improved bb2html() - Added WHEN clause to all SQL TRIGGERs for which it was useful - (this *requires* PostgreSQL 9.0 or up!) + (this *requires* PostgreSQL 9.0 or up!) - Added ON DELETE clause to all foreign keys referencing users (id) - Use word-level (instead of character-level) diff for large fields |