about summary refs log tree commit homepage
path: root/lib/PublicInbox/Feed.pm
DateCommit message (Collapse)
2015-08-23cleanup Email::Address usage
Email::Address::name never fails assuming it was able to parse anything.
2015-08-23feed: r= parameter supports "HEAD" as a revision
public-inbox git repositories require a "HEAD" ref to function correctly anyways.
2015-08-22remove XML::Atom::SimpleFeed dependency
We will attempt to generate Atom feeds "by hand" as the XML::Atom::SimpleFeed API does not support streaming output. Since email is large and servers are small, this should prevent wasting memory when we generate larger feeds. Of course, we hope clients use SAX parsers capable of handling large streams without slurping.
2015-08-22stream HTML views as much as possible
This should allow progressive rendering on the client and reduce memory usage on the server. Unfortunately XML::Atom::SimpleFeed does not yet support streaming, so we may not use it in the future.
2015-08-20feed: fix extra, unnecessary quote
Oops!
2015-08-20avoid using header_raw for Message-ID retrieval
This is for consistency with ssoma. I doubt it makes a difference in practice, but in case somebody decides any of the Message-ID-containing headers should have strange characters, we'll decode and attempt to thread them. This isn't an attack vector, just a way to make messages thread improperly which is pointless...
2015-08-20index: layout fix + title and Atom feed links at top
Add some spacing between topics to improve readability when scanning or in case a subject gets too long. The title and Atom feed may not be highly-visible otherwise. While we're at it, use the proper "Atom feed" terminology since some folks may not understand just what "atom" means.
2015-08-20index: simplify main landing page if search-enabled
We can display /t/$MESSAGE_ID.html easily with a Xapian search index, so rely on it instead of trying to display messages inline.
2015-08-20use tables for rendering comment nesting
This is more space efficient since we don't need to place padding bytes in front of every line. While this unfortunately does not render well on lynx; w3m, links, elinks can all render tables sanely. Tables are also superior for long lines which require wrapping inside <pre> containers.
2015-08-20feed: move timestamp parsing to view
We don't need share duplicate logic across both files.
2015-08-20feed: remove threading from index
We'll be making the index smarter for people with search support enabled. Otherwise, it'll be chronological and a bit dumb. At least it'll use less memory.
2015-08-17drop bodies and messages ASAP after processing
We can rely on reference counting to lower memory usage for big messages.
2015-08-17feed: disable the generator statement
No need to waste bandwidth, here
2015-08-17www: simplify parameter passing to feed
No need to create a new hash when we can reuse the existing one more.
2015-08-17favor /t/ to /s/, since subjects may change mid-thread
/t/ always falls back to subject path searching anyways, so there's little lost besides perhaps more readable URLs. Unfortunately people still use non-compliant mail clients which fail to set In-Reply-To or References headers :<
2015-08-17feed: remove unnecesary time paramenter in index state
We no longer do "smart" time displays as of commit ea0e8649f90d1fd0850a41c0ca16642faadf4f14 ("view: simplify timestamp generation"). In retrospect, that commit also made us more cache-friendly, too.
2015-08-15thread: common sorting code
We'll be sharing the same threading, so it makes sense to sort replies using the same code and message headers without repeating ourselves. This also standardizes on sorting on X-PI-TS (Unix epoch in seconds) instead over using X-PI-Date differently in two different places
2015-07-20feed: extract subroutines for threading
We'll be using this in the future for displaying per-thread views.
2015-07-06feed: compile regexps only once
This avoids some runtime penalties associated with recompiling a regexp based on a constant local variable.
2015-07-06feed: close body tag correctly in index
Oops, noticed by manual inspection. One day we'll run tidy in tests to validate.
2014-09-15index: add prev/next index navigation
This helps readers jump around more quickly when there are large messages.
2014-09-15index group state parameters together for generation
This allows us to more-easily group and pass parameters.
2014-09-15index: show short-ish permalinks to messages in threads
This should allow us to reference discussions more easily.
2014-09-13line-wrap generated HTML source around attrs for readability
It's important to keep HTML source readable to folks who prefer to read raw HTML. This should improve readability of the HTML source by keeping line length in check without wasting bytes.
2014-09-07feed: (cleanup) avoid redundant ->message call
Avoid redundant subroutine calls as their costs tend to add up.
2014-09-07feed: sort child messages (forward) chronologically
Only root messages should be sorted in reverse chronological order, child messages should be chronological. This gives precedence to _topics_, but also for initial replies. This improves readability when several messages appear at the same nesting level, and helps git patch series' appear correctly as: [PATCH 0/3] ... [PATCH 1/3] ... [PATCH 2/3] ... [PATCH 3/3] ... Instead of (what it was previously): [PATCH 0/3] ... [PATCH 3/3] ... [PATCH 2/3] ... [PATCH 1/3] ...
2014-08-28feed: deal with removed files
Sometimes we get spam and need to delete messages, we must prevent errors on missing messages from propagating.
2014-08-28feed: show permalink to home page
This will make it easier to bookmark an index page with threading context.
2014-08-28redo main HTML index to show nested messages
This reduces the need for page reloads in common cases and should improve reading speed so users do not need to open many browser tabs. This will hopefully increase an encourage readership. The downside of this are increased server processing overhead and easier address scraping by spam bots.
2014-08-26show date in top-level threaded index
This is probably useful information for folks browsing via web interface. It'll probably make more sense if we show the entire body in the threaded display, though.
2014-05-07consistently whitespace wrap on <pre> sections
Horizontal scrolling is a usability problem for GUI browsers, so help them avoid it. I love GUI users, really! :)
2014-05-05feed: add atom feed link to the bottom
This should improve navigation as browsers may not make it obvious there is an Atom feed.
2014-05-05www: add footers to HTML index and message views
Some advertising is necessary.
2014-05-04add various TODO items
Screen space is precious, and we do not need it in the abbreviated view.
2014-05-02view: API cleanup, remove "as_" prefix
These views are not OO, so the "as_" prefix makes little sense and "as_html" conflicts with Hval, which is OO.
2014-05-02reduce copies by passing string refs to Email::MIME
This should reduce data copies and memory usage, according to Email::Simple documentation.
2014-05-01workaround Mail::Thread memory leak
Thanks to Ask for the patch in https://rt.cpan.org/Public/Bug/Display.html?id=22817
2014-05-01purge Email::Address cache
This prevents memory bloat in case we're serving many requests with a large, diverse set of email addresses (potentially from malicious spammers).
2014-04-30feed: unset GIT_DIR and use "git --git-dir=.. log"
This should elimate all of our %ENV dependencies in the WWW portion of our code.
2014-04-29implement our own cat-file --batch wrapper
We use --git-dir=... instead of $ENV{GIT_DIR} because ENV changes do not propagate easily with mod_perl.
2014-04-28feed: call URI->as_string explicitly
Implicit string conversion is more confusing.
2014-04-28use relative URLs in HTML index
Browsers know how to follow relative URLs, so we may generate smaller HTML pages.
2014-04-28feed: swap order of "next" and "head" links
This is one less key stroke for somebody paging through the list history.
2014-04-28feed: avoid redirect on permalink
This saves one round-trip request response so reduces latency over slow links. The redirect only exists for convenience and isn't 100% reliable in case the Message-ID terminates with a .(html|txt) suffix.
2014-04-28feed: dead code elimination around dropped endpoints
public-inbox is for discussion, so top-level posts do not get special treatment.
2014-04-28feed: disable navigation to previous page
This is unfortunately needed for scalability to long histories. The design of git requires it to traverse full history to walk forward in time, since commits can only record past history. Instead, replace "prev" with a "head" link to zip us back to the most recent page. Users who wish to go backwards can use browser history, which should always work on our old-fashioned HTML pages.
2014-04-28feed: pedantically quote HTML attributes
This is more correct, although it costs us 4 bytes.
2014-04-28allow running as a Plack app without CGI emulation
This might be slightly cleaner, though generating the base URL now has an ugly condition in it.
2014-04-27feeds use XHTML to avoid tag soup
This should work in most browsers, lets find out!
2014-04-27Feed: <id> element must be a URI, oops :x
For each feed element, we'll just use the link since there's currently no suitable URN.