impressionist icon indicating copy to clipboard operation
impressionist copied to clipboard

impressionist in background

Open staffler-xyz opened this issue 11 years ago • 6 comments

I have a general question about the impressionist gem: Is there any performance gain to use a background queue (e.g. delayed_job) to process the calls?

Let's say i have 40 impressionst(object) calls in my controller. Would it be better to delay all of them in a background method?

Thanks in advance for you answer!

staffler-xyz avatar Jan 10 '14 09:01 staffler-xyz

the same problem...

jason0415 avatar May 15 '14 05:05 jason0415

Same problem. Is it possible to use delayed_job and how ? Thank you.

zenati avatar Jul 06 '14 21:07 zenati

If you really wanted to, I think it would be fairly easy to override the impressionist method, but instead of calling obj.impressions.create, you would schedule the job... I don't think there's another straightforward solution :( I'd be nice if the gem had extracted obj.impressions.create(associative_create_statement...) into a method.

niuage avatar Aug 21 '14 15:08 niuage

That would be a very nice feature. I already use resque for background processing in my application, so this would really take a load off the controller and improve response time.

jpaulo avatar Mar 16 '15 21:03 jpaulo

+1

AndreiMotinga avatar Mar 22 '16 22:03 AndreiMotinga

Anyone on this thread figure out a workaround for delayed job? Having similar, equally predictable performance issues.

trivett avatar Aug 10 '16 16:08 trivett