Commit graph

20 commits

Author SHA1 Message Date
583f3c712f High-level caching for closet lists
Okay, so I still don't know why rendering is just so slow (though
migrating away from item translations did help!), but I can at least
cache entire closet lists as a basic measure.

That way, the first user to see the latest version of a closet list
will still need just as much time to load it… but *only* the ones that
have changed since last time (rather than always the full page), and
then subsequent users get to reuse it too!

Should help a lot for high-traffic lists, which incidentally are likely
to be the big ones belonging to highly active traders!

One big change we needed to make was to extract the `user-owns` and
`user-wants` classes (which we use for trade matches for *the user
viewing the list right now*) out of the cached HTML, and apply them
after with Javascript instead. I always dislike moving stuff to JS, but
the wins here seem. truly very very good, all things considered!
2024-02-20 18:43:39 -08:00
Matchu
02abd4e07f Simplify item_link rendering
In the interest of clearing out Resque, I'm just gonna remove a lot of our more complex caching stuff, and we can do a perf pass for things like big item list pages once everything's upgraded. (I'm hopeful that the upgrades themselves improve perf; and if not, that some improved sensibilities 10 years later can find simpler approaches.)
2023-10-23 19:05:04 -07:00
b6247fa22f prepare partials for closet_hangers#index, too 2013-12-27 21:48:28 -05:00
816584f177 Move item_link partial caching to a helper rather than the template itself
This is a surprisingly huge performance gain. On my testing (with
cache_classes set to true to also cache templates), this sped up
closet_hangers#index rendering by a factor of 2 when there were a
significant number of items. Cool beans.

I think we can even hold off on the individual hanger caching now:
we've made the closet hanger partial tons faster by moving forms out
of them and doing this cache check earlier. I'm expecting significant
performance gains both here and on items#index (though less so there).
I'll deploy and see how much it helps in production; if not enough, we
can look at the layered caching of hangers, lists, groups, full pages,
etc.

So glad we don't *have* to move to a pagination model!
2013-06-22 16:31:46 -07:00
d132567931 move closet-hanger-destroy form to JS 2013-06-22 15:45:59 -07:00
2876de2db0 Move closet-hangers-update form from partial to JS
We lose no-JS support, which I kinda miss, but caching is gonna be more
important down the line. Delete form moves next, then we cache.

CSRF token changes: it looks like, by setting a data attribute in AJAX, I
was overwriting the CSRF token. I don't remember it working that way, but
now we use beforeSend to add the X-CSRF-Token header instead, which is nicer,
anyway. The issue might've been something else, but this worked :/

The CSS was also not showing the loading ellipsis properly. I think that's a
dev-only issue in how live assets are being served versus static assets, but
may as well add UTF-8 charset directives everywhere, anyway.
2013-06-22 15:27:00 -07:00
0731c7093c i18n for closet_hangers#index, closet_lists#edit, closet_lists#new, and maybe some more closet-related things - this was a biggie 2013-01-09 17:15:24 -06:00
7d0edbf23c closet_hangers#destroy now tied to hanger ID, not item 2012-03-23 16:25:10 -05:00
44156c5b21 can now have the same item in more than one list 2012-03-23 16:25:10 -05:00
bad1eb13a5 compare Your Items to someone elses list 2011-08-03 10:33:13 -04:00
b9700e3d7c show owns/wanted items on somene elses items list 2011-07-30 23:03:43 -04:00
9a7b13dc5d drag and drop on Your Items <3 2011-07-30 13:40:41 -04:00
48ee765505 Your Items autocompleter is totally chill with moving items around to different lists 2011-07-29 23:26:48 -04:00
358840076c closet lists, round one 2011-07-29 10:52:04 -04:00
d9f94ae3fa Your Items page aware of wanting items 2011-07-22 17:55:05 -04:00
77818471c5 closet hangers page has nice remove button 2011-07-15 23:14:26 -04:00
99e59a2f9b oops. quantity form only shows on current user closet 2011-07-15 19:29:43 -04:00
437b1c052d quantity form on your items page 2011-07-15 17:21:18 -04:00
1fa9a48ad2 pretty quantities on hangers index 2011-07-15 16:59:15 -04:00
d5641dddbb user closet display 2011-07-14 13:56:20 -04:00