docbrown/app
Daniel Uber 19a2b05770
Use the tag_list method, rather than the cached_tag_list attribute (#15638)
* Use the tag_list method, rather than the cached_tag_list attribute

This is a follow on to #15456 and #15637

Saving the article in #15637 was a work-around to force the article to
have a valid cached tag list. However, we can rely on the tag_list
method to find the associated tags.

Update the worker to use tag_list (rather than the decorator's
cached_tag_list.array) and flatten the tag list rather than flat
mapping String#split over the non-nil cached_tag_lists.

* Remove unused join on tags

The query logging showed each article's tags were loaded twice in a
row (select by id, immediately followed by select by id). Removing the
join removed this behavior. I suspect mapping `#tag_list` over
articles is ignoring the loaded tags.

Performance (in my local environment) improved about 30% when this join was removed.
2021-12-03 14:47:42 -06:00
..
assets Update Android PN integration fixes (#15541) 2021-12-02 13:56:28 -06:00
black_box Make Rubocop happy again (#14729) 2021-09-14 09:15:01 -05:00
components/admin/users Small change to make the tools section of member details mobile friendly. (#15159) 2021-10-22 18:47:20 +02:00
controllers Creator Settings: Removed SVG files as an option for logo upload (#15662) 2021-12-03 10:47:42 -05:00
decorators Refactoring Spam Handler (#15412) 2021-11-30 12:45:12 -05:00
errors Guarding against spam from OAuth Sources (#15404) 2021-11-18 16:26:39 -05:00
helpers Enable Forem (Passport) Auth (#15141) 2021-11-23 14:59:00 -06:00
javascript Update Android PN integration fixes (#15541) 2021-12-02 13:56:28 -06:00
lib user settings i18n (#15098) 2021-12-02 11:35:08 -05:00
liquid_tags First Few Unified Embed implementations (Liquid Tags) (#15550) 2021-12-01 19:33:34 -05:00
mailers ✂✂✂ Remove Connect (#14734) 2021-11-18 08:21:00 -06:00
models Update Android PN integration fixes (#15541) 2021-12-02 13:56:28 -06:00
policies ✂✂✂ Remove Connect (#14734) 2021-11-18 08:21:00 -06:00
queries Adds validations to avoid creating unnecessary PNs (#14621) 2021-08-31 15:00:30 -06:00
refinements Drop profile columns from user (#10707) 2020-12-03 08:14:38 +07:00
sanitizers Remove redundant freeze calls (#14596) 2021-08-26 10:01:08 -04:00
serializers ✂✂✂ Remove Connect (#14734) 2021-11-18 08:21:00 -06:00
services Validate payment info present before attempting to process (#15629) 2021-12-03 13:09:23 -06:00
uploaders Creator Settings: Removed SVG files as an option for logo upload (#15662) 2021-12-03 10:47:42 -05:00
validators Updating valid domain registration (#15436) 2021-11-19 10:05:00 -05:00
view_objects Upgrade to Ruby 3.0.2 (#12103) 2021-08-25 14:26:33 -04:00
views Creator Settings: Removed SVG files as an option for logo upload (#15662) 2021-12-03 10:47:42 -05:00
workers Use the tag_list method, rather than the cached_tag_list attribute (#15638) 2021-12-03 14:47:42 -06:00