Commit graph

51 commits

Author SHA1 Message Date
Matchu
72461972ca Start building new item search
Just name field right now, more to come! A lot deleted lol
2023-10-23 19:05:03 -07:00
94d9aab547 campaign bar in infinite closet 2014-09-11 20:12:43 -05:00
2594497434 whoops; if page 2 of a search had 1 item, we jumped right to it, as if it
were the *only* result. now only do that redirect if *total* results == 1.

Mad props to diceroll123. Welcome to the commit log, bro.
2014-06-15 17:35:08 -07:00
1d11cf6edc better handling of i18n and labels and resource filters and junk 2014-04-02 10:32:13 -05:00
170b7fa6f5 can search items with a form-based query instead of text-based 2014-04-02 10:32:13 -05:00
f07996d762 cache pet images on items#show, in case that's what's being a super-slow jerkface 2013-12-05 15:22:43 -06:00
72c59f0b68 if there's only one item search result, redirect to it 2013-07-09 19:54:22 -07:00
4c208c9ac3 instead of returning an empty item list on contradiction, return an empty proxy collection 2013-07-03 18:17:16 -07:00
b92131b26c use item proxies in items#index when given item IDs 2013-06-27 00:15:20 -07:00
9e3cac82ec use proxies for item html, too
Some lame benchmarking on my box, dev, cache classes, many items:

No proxies:
    Fresh JSON:  175,  90,  90,  93,  82, 88, 158, 150, 85, 167 = 117.8
    Cached JSON: (none)
    Fresh HTML:  371, 327, 355, 328, 322, 346 = 341.5
    Cached HTML: 173, 123, 175, 187, 171, 179 = 168

Proxies:
    Fresh JSON:  175, 183, 269, 219, 195, 178 = 203.17
    Cached JSON:  88,  70,  89, 162,  80,  77 = 94.3
    Fresh HTML:  494, 381, 350, 334, 451, 372 = 397
    Cached HTML: 176, 170, 104, 101, 111, 116 = 129.7

So, overhead is significant, but the gains when cached (and that should be
all the time, since we currently have 0 evictions) are definitely worth
it. Worth pushing, and probably putting some future effort into reducing
overhead.

On production (again, lame), items#index was consistently averaging
73-74ms when super healthy, and 82ms when pets#index was being louder
than usual. For reference is all. This will probably perform
significantly worse at first (in JSON, anyway, since HTML is already
mostly cached), so it might be worth briefly warming the cache after
pushing.
2013-06-26 23:50:19 -07:00
e42de795dd Use item proxies for JSON caching
That is, once we get our list of IDs from the search engine, only
fetch records whose JSON we don't already have cached.

It's simpler here to use as_json, but it'd probably be even faster
if I figure out how to serve a plain JSON string from a Rails
controller. In the meantime, requests of entirely cached items
are coming in at about 85ms on average on my box (dev, cache
classes, many items), about 10ms better than the last
iteration.
2013-06-26 23:01:12 -07:00
dd30fbe0d7 move from with_translations to includes(:translations), since we dont usually care about requiring 2013-01-24 18:26:00 -06:00
b2822d901b fix n+1 query for translations on items#index 2013-01-24 18:26:00 -06:00
26ac3782ec move zones to database 2013-01-24 18:26:00 -06:00
332a7e67d8 update ItemsController to show new search errors properly 2013-01-24 18:24:35 -06:00
6e09b8bc10 globalized search first draft
Confirmed features:
    * Output (retrieval, sorting, etc.)
    * Name (positive and negative, but new behavior)
    * Flags (positive and negative)

Planned features:
    * users:owns, user:wants

Known issues:
    * Sets are broken
        * Don't render properly
        * Shouldn't actually be done as joined sets, anyway, since
          we actually want (set1_zone1 OR set1_zone2) AND
          (set2_zone1 OR set2_zone2), which will require breaking
          it into multiple terms queries.
    * Name has regressed: ignores phrases, doesn't require *all*
      words. While we're breaking sets into multiple queries,
      maybe we'll do something similar for name. In fact, we
      really kinda have to if we're gonna keep sorting by name,
      since "straw hat" returns all hats. Eww.
2013-01-24 18:24:35 -06:00
c9ae7155b1 locale metadata, including hidden locales for item loading and selection 2013-01-24 18:24:34 -06:00
9c8f7f498f basic translation infrastructure for items - search is still english-only, and probably will have to be replaced with a legit search engine 2013-01-24 18:24:34 -06:00
ac0490dc1d i18n for items#show (including javascripts/items/show.js) 2013-01-24 18:23:19 -06:00
5e89e2b947 i18n for items#index (and layouts#items) 2013-01-24 18:23:18 -06:00
f56b544963 brought-to-you-by on items#show lists contributors 2012-10-24 22:09:05 -05:00
f6d34841ec cache newest items on homepage and items#index 2012-08-09 22:35:30 -04:00
72237f225c modeling hub 2012-08-06 21:15:31 -04:00
44156c5b21 can now have the same item in more than one list 2012-03-23 16:25:10 -05:00
d335c2e677 properly handle search error in rails 3.0.5 2012-01-13 15:10:25 -06:00
ea4564569b show own/want on new items 2011-08-04 10:33:35 -04:00
5d3343bd6c show twice as many new items 2011-08-04 10:30:00 -04:00
d99a1ad792 newest items 2011-08-04 10:01:44 -04:00
374e85f9d0 drop in redirect image url for urls blocked on petpages 2011-08-02 20:01:48 -04:00
be5bdb1eec handle search errors better in wardrobe 2011-08-01 00:00:39 -04:00
137aeac8d4 show traders on items#show 2011-07-31 00:19:28 -04:00
85af53417b distinguish between owning and wanting an item 2011-07-22 15:35:38 -04:00
884ad2d5b8 user:owns in item search 2011-07-17 17:24:29 -04:00
e6020a5cfe simplify closeting item 2011-07-15 16:32:05 -04:00
fab612950a basic hanger interface from item 2011-07-14 13:56:44 -04:00
3a193d534d closeted icon, all over the place 2011-07-14 13:56:44 -04:00
3b7f158890 cache just content on items, not action, so we can still use title and canonical 2011-05-20 20:23:37 -04:00
ca9e1fb0ca cache item show pages as a first try :) 2010-12-08 20:15:46 -05:00
1f1c219005 fix species:x bug on new arel, start tracking unintended search exceptions 2010-11-16 23:32:53 -05:00
ef004cc6cb needed objects 2010-11-06 13:07:12 -04:00
c8acdc4e8d working home page 2010-11-05 18:45:05 -04:00
d984f84445 prep wardrobe js for standalone server use 2010-10-11 18:37:20 -04:00
e40d4601d8 a functioning wardrobe 2010-10-10 22:18:42 -04:00
a0a1a94e96 send jsonp errors with callbacks so they load 2010-06-26 16:20:51 -04:00
fbba36005e distribute items as jsonp 2010-06-22 13:00:55 -04:00
df3fcd101f retain query on item page 2010-06-07 20:02:46 -04:00
f794d07c2c basic show page 2010-05-15 20:46:41 -04:00
2f057ca7ca use flash.now to prevent late flashes 2010-05-15 18:26:27 -04:00
3062dd9376 pagination for results 2010-05-15 14:14:17 -04:00
8519f9131b item presentation is neat 2010-05-15 14:01:15 -04:00