Recent Posts by distler
posted 13 years ago
distler
123 posts
|
It’s the number of inbound links that matters, but yeah.
You do, for a newly-created page… but not, I agree, for a revision of an existing page. I was, somewhat crudely, not distinguishing between those cases. It occurs to me that I can use an |
posted 13 years ago
distler
123 posts
|
That would be a consequence of
The first is further-complicated by the facility for renaming pages. That means we need to expire all the pages that refer to the old page and all the pages that refer to the new page. I guess that could be optimized better for the case where the page doesn’t change names, as we don’t have to expire the same pages twice. I think the current procedure was motivated by complaints (from y’all) that, in some circumstances, pages were not being expired when they should. |
posted 13 years ago
distler
123 posts
edited 13 years ago |
On my machine, each Expired fragment takes 0.1-0.2 ms. So to get 10-20 s, you’re talking about expiring fragments?! Wow! That’s impressive. |
posted 13 years ago
distler
123 posts
|
I’m a little baffled. It should work. Sometimes it does (saving the file triggers the cache sweeper); sometimes it doesn’t. I can’t see what the difference is. Will have to investigate further … |
posted 13 years ago
distler
123 posts
edited 13 years ago |
Forum: Instiki – Topic: Feature Requests
Indeed, there is. And that’s why there are no anchors allowed. If page “Foo” has multiple WikiLinks to [[Bar]], there’s still only one corresponding entry in the database. That could no longer be true if “Foo” could link to [[Bar]] and to [[Bar#baz]]. What you want is a hyperlink, and Markdown provide a syntax for hyperlinks which permits anchors. Update:On reflection, I suppose that allowing the presence of anchors doesn’t strictly conflict with having just one entry in the database. I should think some more … |
posted 13 years ago
distler
123 posts
edited 13 years ago |
You’re probably correct. The rule is that pages with Flash messages on them (like the one that tells you that the file was successfully-uploaded) are not cached. So you get to see the correct page once, but if the incorrect one wasn’t deleted from the cache, that’s what you’ll see the second time. Fixed in |
posted 13 years ago
distler
123 posts
edited 13 years ago |
Forum: Heterotic Beast – Topic: Rails 3.1.0 I upgraded Heterotic Beast to Rails 3.1.0. Despite all my prior testing, the process didn’t go as smoothly as I would have liked, and this forum was pretty disrupted for most of Friday. Should be back to normal now. But leave a comment here, if something’s still broken for you. The main new feature is the Asset pipeline, which supposedly speeds the delivery of static files (CSS, javascript, and images). Unfortunately, the result seems buggy.
Other minor bugs include:
|
posted 13 years ago
distler
123 posts
|
Of course they are different.
In X(HT)ML, the latter is equivalent to ” The short-tag construction does not exist in HTML and all browsers interpret the latter as the opening tag, ” |
posted 13 years ago
distler
123 posts
|
would not have triggered the bug. Only empty elements (which get converted to short-tag syntax, |
posted 13 years ago
distler
123 posts
|
Same thing happen(ed) when you typed (the equally useless)
Fixed in Revision 744. |
posted 13 years ago
distler
123 posts
edited 13 years ago |
Forum: Heterotic Beast – Topic: Bugs No it doesn’t. Deleting the only post in a topic, also deletes the topic. Possibly, the redirect (which normally goes to |
posted 13 years ago
distler
123 posts
edited 13 years ago |
The former. You’re trading off workload on the server for stale data. Since computers are supposed to serve humans, rather than the other way around, the question is: does this improve the user experience? Say you implement the above suggestion. On the one hand, the user always (or almost always, depending on implementation) receives the cached page, i.e. gets a quick response. On the other hand, the data is invariably stale. Leaving these alone, the user is guaranteed to receive fresh data, but there could be a significant delay, if the page has to be regenerated. What percentage of requests for these pages hit the cache? A better solution is to pull in the As to moving away from Maruku, to some
|
posted 13 years ago
distler
123 posts
|
Did a lot of profiling this weekend, and produced a few tweaks to Maruku’s parsing, which speeded it up a little. Unfortunately, the main discovery was that (with that test page as input), 3/4 of Maruku’s time is spent in the I hope that one of your guys finds formal grammars sufficiently “categorical” to be worthy of a small bit of their attention. |
posted 13 years ago
distler
123 posts
|
Pretty much everything beyond the standard Markdown syntax needs to be written, though some folks in the peg-markdown network seem to have included Michel Fortin’s Markdown-Extra extensions (albeit, along with some of their own, incompatible, extensions). Presumably, this fork of peg-markdown would be directly linked to the itex2MML functions which process inline and display equations (ie, it would not use the Ruby bindings provided by the itextomml gem). So there’s a little bit more to do than write the peg grammar. But not a lot more … As to whether you want to ask someone to do this, I’ve already explained my desire to replace Maruku (for licensing reasons). Here’s another motivation, from efficiency. Instiki’s performance does genuinely suck, in this instance. The question is, are they (your nlab colleagues) willing to do anything about improving it? Feel free to point them to this discussion, and to the previous one on Markdown alternatives. |
posted 13 years ago
distler
123 posts
edited 13 years ago |
On
Note that it does spend (what I consider to be) a significant amount of time querying the database, but it is totally dwarfed by the rendering time. (I don’t know why yours is spending an order of magnitude longer querying the database. Seems like something’s very wrong, there, even though the conclusion is the same.) The page, of course, contains a number of markup errors, like
which sent Maruku into convulsions. Surprisingly, correcting those errors did not appreciably affect the rendering time (the above-reported time is after making the relevant markup corrections). On my laptop, a typical time was
SQlite3 is faster than MySQL, but the machine itself is significantly slower than the iMac. Of those 49 seconds, spent rendering the page, 43 of them were spent in Maruku (for obscure reasons, Maruku has to be run twice, so really, we’re talking about 22 seconds to process the 175KB source). Maruku doesn’t particularly care about the number of WikiLinks, so that has nothing to do with why it takes so long render this particular page. Of the remaining 6 seconds, 4 seconds were spent in the Instiki Sanitizer. I don’t think there’s much to optimize there. The remaining 2 seconds were, largely, spent in the Chunk-Handler – the thing that processes Wikilinks (and, presumably, cares about how many of them there are). 2 seconds is still a long time, but it’s not surprising. Doing on the order of RegExp substitutions (5360 chunk-masking and 686 chunk-unmasking operations, to be precise) on a 175KB string, takes significant time. Using Regexps to process long strings sucks. I have looked at various optimizations of the Chunk-Handler code, but nothing I can do will contribute much to the speedup of rendering this page, which is dominated by Maruku. Now, if one of your nLab folks were to volunteer to write a PEG grammar for Maruku’s extended Markdown syntax, … Update:
Since I’m not gonna hold my breath for that to happen, I decided to spend some time (alas, more than I expected) making Maruku faster. The new rendering times for that page are
on
on my laptop. Roughly a factor of 2 improvement in the total rendering time, in both cases. Still not great, but it’s the best that I am going to achieve. |
posted 13 years ago
distler
123 posts
edited 13 years ago |
Forum: Heterotic Beast – Topic: Bugs
How does Vanilla keep track of what posts you’ve read? |
posted 13 years ago
distler
123 posts
|
Could you compare (by deleting the cached page and reloading ) how long it takes to build a wikilink-heavy page, versus a “normal” one? I’m particularly interested in the database-lookup times. As I said via email, the WikiReferences model uses a lot of raw SQL queries (which, therefore, do not benefit from ActiveRecord caching). But I am a little skeptical that is the cause of much of a slowdown. |
posted 13 years ago
distler
123 posts
edited 13 years ago |
It keeps 25 files, of size 1MB each. Both of these numbers are configurable. |
posted 13 years ago
distler
123 posts
edited 13 years ago |
You seem to be inured to the idea of Instiki crashing. I am not. It shouldn’t crash, and there’s something wrong if it does. I’m not even convinced that my |
posted 13 years ago
distler
123 posts
|
Forum: Instiki – Topic: Feature Requests As far as I can tell, updating the application files on a running Rails application (in production mode) has no effect, until the application is restarted. I, honestly, haven’t thought about the bundled Gems, but I expect the answer is the same. In any case, But I don’t think that’s your issue… |
posted 13 years ago
distler
123 posts
edited 13 years ago |
Forum: Instiki – Topic: Feature Requests
Instiki cannot be installed as a Gem. There’s an old (~0.10.x) version, which worked as a Gem, and which is probably still floating around (on the internets, nothing ever really disappears). But that was long before my time, and I have not even thought about packaging the current version as a Gem. Of course, under Passenger, you can run multiple instances of a Rails application (including Instiki), under different subdirectories (or subdomains, if you have virtual hosts enabled). (At least with Instiki, that would require separate copies of the code, as each instance would have to point to its own database (in |
posted 13 years ago
distler
123 posts
edited 13 years ago |
Let’s keep it “off” for the time-being; I don’t have any plans to change anything for the next week, at least. Do you have any other scripts/cron-jobs running? |
posted 13 years ago
distler
123 posts
|
Forum: Instiki – Topic: Feature Requests
I am familiar with the usage (there’s not a UK/US distinction). I was making a lame attempt at humour, whilst making the serious point that these CSS classes are used for styling (generated content), and as structural hooks (for converting the |
posted 13 years ago
distler
123 posts
edited 13 years ago |
Forum: Heterotic Beast – Topic: Bugs Hmmm. Both are running in Hah! Fixed, now. Boolean comparisons are not the same in SQLite3 and MySQL. Finding a syntax that works in both was … umh … fun. |
posted 13 years ago
distler
123 posts
|
Forum: Heterotic Beast – Topic: Feature Requests Hmm. I think tagging a post as having been edited, after the grace period, should suffice. See what you think. |
posted 13 years ago
distler
123 posts
|
Forum: Instiki – Topic: Feature Requests
I bridle, only at referring to these as “dummy.” I thought that the whole mechanism I invented with those classes was very clever. And even more versatile than I had originally envisioned. Not “dummy” at all…. |
posted 13 years ago
distler
123 posts
|
Forum: Instiki – Topic: Feature Requests I’m not sure I understand. If an element has an explicit id, because you gave it a I think your motivation is to have something that converts to LaTeX.
The latter is a bit awkward, as there can be several ordered-lists on a page. We’d need a separate counter for each one, no? |
posted 13 years ago
distler
123 posts
edited 13 years ago |
Forum: Heterotic Beast – Topic: Feature Requests
I think this maps onto
with the proviso that (at least as currently implemented) “Sites” need to live on separate subdomains. So you’re talking about allowing anonymous postings on a per-forum basis?
There’s some captcha mechanism built-in (but disabled) in Beast. Will have to explore …
I suppose just creating a “Guest” user, with a blank password, would not suffice, as “Guest” could then post to any forum.
Or simply tag the post, itself, as having been “Edited at …” Maybe best of all would be a 5-minute grace period: if … Like on this post. |
posted 13 years ago
distler
123 posts
|
There are several.
The latter is probably the most promising. One “just” needs to write a PEG grammar for Maruku’s extended Markdown syntax, and then drop it in as a replacement. “Just” … |
posted 13 years ago
distler
123 posts
|
Forum: Heterotic Beast – Topic: Feature Requests Andrew Stacey wants:
Other thing that bear looking at:
|