Finally, are you sure it's the open/close overhead that would kill the naive approach? I'm with you on this, but the point is that neither of us can tell without measuring.
More or less. The reason I said "positive" is because a sizable portion of the site is a photo archive under one directory, which contains a whole slew of pages that present thumbnails -- they have little or no text in them. Of course, there is a little more involved than just "opening and closing" them, they must also be parsed to eliminate the html tags. Which that is an inescapable part of the deal. But if I exclude that directory -- which contains a negligible portion of the data -- the search is very very noticeably faster.
I also know from other directory tree stuff that even WITHOUT this parsing, a few hundred or thousand files spread across 10+ gigs is a LOT just to stat the files. Try "du / >tmp.txt" on your hard drive. It will take several minutes at least, and that is a C program just collecting file sizes. A site-search engine is not much good if it takes more than 5-10 seconds, methinks.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.