acts-as-taggable-on icon indicating copy to clipboard operation
acts-as-taggable-on copied to clipboard

Loads all tags/taggings on taggable object load after upgrading to v6.0.0

Open colemerrick opened this issue 6 years ago • 4 comments

Previously, when loading a taggable object, it's tags did not load. After upgrading to v6.0.0, whenever a taggable object is loaded, all it's tags are also loaded (and consequently all it's taggings). This is a huge performance hit.

I can't find anywhere in the commit history where this functionality was adopted as a feature although a similar feature had been requested in the past: #91. Therefore, I am calling this a bug.

If for some reason I am missing something, and this was a finished feature, then we need to create some way of opting out. Thoughts?

colemerrick avatar Nov 10 '18 01:11 colemerrick

We observed similar behavior and pinned it down to a devise, serializing all attributes when inspecting the object.

We were able to remove the noise when running in the rails console by including tag_list in the the blacklist (Devise::Models::Authenticatable::BLACKLIST_FOR_SERIALIZATION << :tag_list).

The issue did not occur when loading models during a web request.

amaierhofer avatar Feb 19 '20 09:02 amaierhofer

@amaierhofer That sounds like a devise issue. We forked this lib and we're able to get rid of it.

colemerrick avatar Feb 19 '20 18:02 colemerrick

@colemerrick Just seeing this thread now. I looked at the forked version in your repository but didn't see any associated changes/fixes for this. Maybe I misunderstood your last comment (from Feb 19, 2020), but do you have a commit/fix for this issue?

cpjolicoeur avatar Mar 16 '21 20:03 cpjolicoeur

I'm wondering if there is a fix for this too? I see the issue when fragment/russian doll caching taggable records. I verified it doesn't happen in version 5.0.0, but it appears to have been introduced in version 6.0.0. I'm able to reproduce it in version 8.1.0.

ggladden avatar Aug 05 '21 20:08 ggladden