We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This line took 200 ms on my mbp :(
rails_panel/meta_request/lib/meta_request/storage.rb
Line 10 in 978642f
Or we could use the tempfile like this? Just a POC.
tempfile
require 'tempfile' module MetaRequest class Storage attr_reader :key def initialize(key) @key = key end def write(value) tempfiles[json_file].write(value) end def read if tempfiles.has_key?(json_file) tempfile = tempfiles[json_file] tempfile.rewind tempfile.read end end private def tempfiles @@tempfiles ||= Hash.new { |hash, key| hash[key] = Tempfile.new(key) } end def json_file "#{key}.json" end end end
No file pool implemented. Depend on the system how to gc.
The run time reduce to 1.5 ms.
The text was updated successfully, but these errors were encountered:
I found out it will make a little bit slow in developing. Is this possible to turn off via environment variable?
Sorry, something went wrong.
No branches or pull requests
This line took 200 ms on my mbp :(
rails_panel/meta_request/lib/meta_request/storage.rb
Line 10 in 978642f
Or we could use the
tempfile
like this? Just a POC.No file pool implemented. Depend on the system how to gc.
The run time reduce to 1.5 ms.
The text was updated successfully, but these errors were encountered: