-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slow attachment.url's #12
Comments
Hello @izelnakri, Thanks for reporting! Sorry for the late reply, I will try to take a look soon! |
there are actually more issues with this gem, just like its paperclip sibling. Some of the issues I've raised in the paperclip gem is relevant for this gem as well. Please take a look at it: janko/paperclip-dropbox#36. I wish I could contribute to the gem since it seems like one of the worst gems I'm currently using so far, days of frustration over some wrong implementations or bad conventions. (No offense here, just objective opinion). However I'm not very good with metaprogramming in ruby yet. Thanks for your interest! |
@izelnakri , @robin850 I have same issue right now. However I can't simply specify Dropbox URL as it changes each time I upload file, for example: dl.dropboxusercontent.com/1/view/df106vuup1mzftx/Apps/[YOURAPP/[YOURFILE] |
I am having similar issues with this gem as for as performance is concerned. I don't see any optimizations which are done on this, are there any tweaks we can do to avoid this performance issue. |
Hi there! Sorry for the very late response! Actually I'm wondering whether the problem lies in this gem ; this seems to be a problem on the require 'benchmark'
require 'dropbox_sdk'
session = DropboxSession.new("app_key", "app_secret")
session.set_access_token("access_token", "acces_token_secret")
client = DropboxClient.new(session, "dropbox")
puts Benchmark.measure {
client.media("/path/to/existing/image.png")["url"]
} It takes a whole second to run on my computer:
I will further investigate, thanks for reporting guys! 👍 |
I am having similar issue too |
1 similar comment
I am having similar issue too |
Just wanted to confirm that the issue lies with dropbox_sdk gem (as @robin850 mentioned). I have run benchmarks on every method down the call stack, and the only point where it significantly slows down (sometimes up to 2 seconds!) is main HTTP call inside Dropbox SDK |
Hi, I am experiencing same issue, image taking too much time. |
The Following code fixes slow rendering / url retrieval issues when a model has an attachment.url:
Before the fix = (Views: ~1800ms | ActiveRecord: 0.7ms)
After the fix = (Views: ~10ms | ActiveRecord: 0.7ms)
The text was updated successfully, but these errors were encountered: