1

Slow loading RA pages (Read 625 times)

    When the server creates a forum page, it scans through each post to filter out disallowed tags. For example, if you type "<script>DoSomethingMalicious()</script>", it is displayed as text instead of treating the contents of the tag as script. This is to ensure that nothing malicious gets inserted into the post, thus ruining other users' experience. This is also why BBCode is invented, so that only certain recognized tags are converted into valid HTML tags. The more text you type, the more work the server has to do. When you have some 60,000 characters in a single post, you uncovered a performance bottleneck in the filtering code. I'll rewrite this part of the code, but it'll probably be released in the next major update. eric Smile


    A Dance with Monkeys

      Thanks. Should you filter on the way in rather than on the way out?
        Thanks. Should you filter on the way in rather than on the way out?
        I could do that, but that would mean modifying your posts, which isn't all that cool, even if you're trying to be malicious.


        A Dance with Monkeys

          You could tag the posts as safe/unsafe on the way in and process the unsafe ones only on the way out. Wink