Comments (6)
SmartListing has been tested only with ERB and Haml. We do not know the impact of using other template engines on its performance, but it seems to be an issue of Slim and not SmartListing. For comparison, here is the log for rendering 6 SmartListings on one page using Haml:
Started GET "/smart_listing" for 127.0.0.1 at 2014-05-23 15:52:04 +0200
Processing by SmartListingController#index as HTML
(0.2ms) SELECT COUNT(*) FROM "users" WHERE "users"."session_id" = '6d5c30ccaedd6bc783436f088f20f521937ce2f7'
CACHE (0.0ms) SELECT COUNT(*) FROM "users" WHERE "users"."session_id" = '6d5c30ccaedd6bc783436f088f20f521937ce2f7'
CACHE (0.0ms) SELECT COUNT(*) FROM "users" WHERE "users"."session_id" = '6d5c30ccaedd6bc783436f088f20f521937ce2f7'
CACHE (0.0ms) SELECT COUNT(*) FROM "users" WHERE "users"."session_id" = '6d5c30ccaedd6bc783436f088f20f521937ce2f7'
CACHE (0.0ms) SELECT COUNT(*) FROM "users" WHERE "users"."session_id" = '6d5c30ccaedd6bc783436f088f20f521937ce2f7'
CACHE (0.0ms) SELECT COUNT(*) FROM "users" WHERE "users"."session_id" = '6d5c30ccaedd6bc783436f088f20f521937ce2f7'
(0.3ms) SELECT COUNT(*) FROM "sample_texts" WHERE "sample_texts"."session_id" = '6d5c30ccaedd6bc783436f088f20f521937ce2f7'
(0.3ms) SELECT COUNT(*) FROM "users" WHERE "users"."session_id" = '6d5c30ccaedd6bc783436f088f20f521937ce2f7' AND "users"."id" IS NULL
--- []
User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."session_id" = '6d5c30ccaedd6bc783436f088f20f521937ce2f7' LIMIT 3 OFFSET 0
Rendered smart_listing/_user_simplest.html.haml (5.6ms)
Rendered smart_listing/_user_simplest.html.haml (0.3ms)
Rendered smart_listing/_user_simplest.html.haml (0.2ms)
CACHE (0.0ms) SELECT COUNT(*) FROM "users" WHERE "users"."session_id" = '6d5c30ccaedd6bc783436f088f20f521937ce2f7'
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.1ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.2ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.1ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.1ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.1ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_links.html.erb (11.3ms)
Rendered smart_listing/_users_simplest_list.html.haml (41.4ms)
--- []
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_sortable.html.erb (0.2ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_sortable.html.erb (0.3ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_sortable.html.erb (0.3ms)
User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."session_id" = '6d5c30ccaedd6bc783436f088f20f521937ce2f7' ORDER BY name asc LIMIT 3 OFFSET 0
Rendered smart_listing/_user_sorting.html.haml (0.3ms)
Rendered smart_listing/_user_sorting.html.haml (0.2ms)
Rendered smart_listing/_user_sorting.html.haml (0.2ms)
CACHE (0.0ms) SELECT COUNT(*) FROM "users" WHERE "users"."session_id" = '6d5c30ccaedd6bc783436f088f20f521937ce2f7'
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.1ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.1ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.2ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.1ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.2ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_links.html.erb (11.1ms)
Rendered smart_listing/_users_sorting_list.html.haml (42.3ms)
--- []
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_sortable.html.erb (0.3ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_sortable.html.erb (0.3ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_sortable.html.erb (0.3ms)
CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."session_id" = '6d5c30ccaedd6bc783436f088f20f521937ce2f7' ORDER BY name asc LIMIT 3 OFFSET 0
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_action_custom.html.erb (0.1ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_action_edit.html.erb (0.3ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_action_delete.html.erb (0.4ms)
Rendered smart_listing/_user_actions.html.haml (5.9ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_action_custom.html.erb (0.3ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_action_edit.html.erb (0.3ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_action_delete.html.erb (0.3ms)
Rendered smart_listing/_user_actions.html.haml (6.2ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_action_custom.html.erb (0.1ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_action_edit.html.erb (0.2ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_action_delete.html.erb (0.4ms)
Rendered smart_listing/_user_actions.html.haml (6.0ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_item_new.html.erb (0.8ms)
CACHE (0.0ms) SELECT COUNT(*) FROM "users" WHERE "users"."session_id" = '6d5c30ccaedd6bc783436f088f20f521937ce2f7'
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.1ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.2ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.2ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.2ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.2ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_links.html.erb (11.7ms)
Rendered smart_listing/_users_actions_list.html.haml (64.7ms)
--- []
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_sortable.html.erb (0.2ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_sortable.html.erb (0.3ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_sortable.html.erb (0.3ms)
CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."session_id" = '6d5c30ccaedd6bc783436f088f20f521937ce2f7' ORDER BY name asc LIMIT 3 OFFSET 0
Rendered smart_listing/_user_controls.html.haml (0.3ms)
Rendered smart_listing/_user_controls.html.haml (0.3ms)
Rendered smart_listing/_user_controls.html.haml (0.3ms)
CACHE (0.0ms) SELECT COUNT(*) FROM "users" WHERE "users"."session_id" = '6d5c30ccaedd6bc783436f088f20f521937ce2f7'
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.1ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.1ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.2ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.1ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.2ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_links.html.erb (11.2ms)
Rendered smart_listing/_users_controls_list.html.haml (42.4ms)
---
- :data:
:callback_href: "/smart_listing/users/select"
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_sortable.html.erb (0.2ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_sortable.html.erb (0.4ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_sortable.html.erb (0.4ms)
CACHE (0.0ms) SELECT "users".* FROM "users" WHERE "users"."session_id" = '6d5c30ccaedd6bc783436f088f20f521937ce2f7' ORDER BY name asc LIMIT 3 OFFSET 0
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_action_custom.html.erb (0.3ms)
Rendered smart_listing/_user_cart.html.haml (3.7ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_action_custom.html.erb (0.2ms)
Rendered smart_listing/_user_cart.html.haml (2.3ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_action_custom.html.erb (0.3ms)
Rendered smart_listing/_user_cart.html.haml (2.7ms)
CACHE (0.0ms) SELECT COUNT(*) FROM "users" WHERE "users"."session_id" = '6d5c30ccaedd6bc783436f088f20f521937ce2f7'
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.1ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.1ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.1ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.1ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.2ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_links.html.erb (10.3ms)
Rendered smart_listing/_users_summary.html.haml (0.1ms)
Rendered smart_listing/_users_cart_list.html.haml (51.7ms)
--- []
SampleText Load (0.4ms) SELECT "sample_texts".* FROM "sample_texts" WHERE "sample_texts"."session_id" = '6d5c30ccaedd6bc783436f088f20f521937ce2f7' LIMIT 3 OFFSET 0
Rendered smart_listing/_sample_text.html.haml (3.6ms)
Rendered smart_listing/_sample_text.html.haml (0.3ms)
Rendered smart_listing/_sample_text.html.haml (0.3ms)
CACHE (0.0ms) SELECT COUNT(*) FROM "sample_texts" WHERE "sample_texts"."session_id" = '6d5c30ccaedd6bc783436f088f20f521937ce2f7'
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.1ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.1ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.1ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_link.html.erb (0.2ms)
Rendered /home/phitherek/github/Sology/smart_listing/app/views/smart_listing/_pagination_per_page_links.html.erb (8.0ms)
Rendered smart_listing/_sample_texts_list.html.haml (34.7ms)
Rendered smart_listing/index.html.haml within layouts/application (305.4ms)
Completed 200 OK in 342ms (Views: 323.3ms | ActiveRecord: 5.8ms)
from smart_listing.
Thank's @Phitherek, later i'll test with erb or haml and post my logs so we can detect if the problem is slim, or maybe the vm where i'm running my app.
from smart_listing.
Hello @pablocrivella,
Any news about this issue?
from smart_listing.
@ljachymczyk sorry i didn't have time to test this with erb or haml in my vm, you can close this issue if you want. i'll give feedback anyway as soon as i can test this issue.
from smart_listing.
The rendering is still too slow with EBR. So the problem must be my vm.
Here are the logs.
Started GET "/items?items_smart_listing%5Bpage%5D=2" for 10.0.2.2 at 2014-06-15 12:12:52 -0400
Processing by ItemsController#index as JS
Parameters: {"items_smart_listing"=>{"page"=>"2"}}
(2.1ms) SELECT COUNT(*) FROM "items"
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_sortable.html.erb (2.1ms)
Item Load (1.6ms) SELECT "items".* FROM "items" LIMIT 10 OFFSET 10
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_custom.html.erb (1.5ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_edit.html.erb (1.4ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_delete.html.erb (2.1ms)
Rendered items/_item.html.erb (1098.9ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_custom.html.erb (0.4ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_edit.html.erb (0.3ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_delete.html.erb (0.9ms)
Rendered items/_item.html.erb (1051.7ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_custom.html.erb (1.3ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_edit.html.erb (0.6ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_delete.html.erb (0.7ms)
Rendered items/_item.html.erb (1091.7ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_custom.html.erb (0.4ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_edit.html.erb (0.6ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_delete.html.erb (0.9ms)
Rendered items/_item.html.erb (994.6ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_custom.html.erb (0.3ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_edit.html.erb (0.5ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_delete.html.erb (0.7ms)
Rendered items/_item.html.erb (1144.8ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_custom.html.erb (0.5ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_edit.html.erb (1.7ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_delete.html.erb (0.6ms)
Rendered items/_item.html.erb (1039.9ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_custom.html.erb (0.3ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_edit.html.erb (0.6ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_delete.html.erb (0.7ms)
Rendered items/_item.html.erb (1114.5ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_custom.html.erb (0.5ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_edit.html.erb (0.6ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_delete.html.erb (0.6ms)
Rendered items/_item.html.erb (986.0ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_custom.html.erb (0.4ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_edit.html.erb (0.5ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_delete.html.erb (0.8ms)
Rendered items/_item.html.erb (1205.7ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_custom.html.erb (0.6ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_edit.html.erb (0.6ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_action_delete.html.erb (0.8ms)
Rendered items/_item.html.erb (1041.1ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_item_new.html.erb (4.0ms)
CACHE (0.0ms) SELECT COUNT(*) FROM "items"
Rendered items/_list.html.erb (16581.4ms)
Rendered /usr/local/rvm/gems/ruby-2.1.0@todo/gems/smart_listing-1.0.0/app/views/smart_listing/_update_list.js.erb (16994.3ms)
Rendered items/index.js.erb (17429.5ms)
Completed 200 OK in 18243ms (Views: 18220.3ms | ActiveRecord: 3.7ms)
from smart_listing.
Closing then.
from smart_listing.
Related Issues (20)
- Rails 5 Strong Parameters removes hash access for unpermitted params HOT 3
- Compatibility with rails 5.1 HOT 13
- be able to sort with an intance method of the class and not a column
- Prevent SQL Injection HOT 2
- Multiple params doesnt work after search HOT 1
- Update README regarding JS dependency HOT 1
- Pass locals params doesn't work HOT 1
- Rails 5.1 uses Webpack HOT 2
- Undefined local variable or method `smart_listing_resource' HOT 1
- Your site is down. HOT 1
- Elasticsearch with smart_listing
- Broken implicit sorting by join tables in v1.2.3 HOT 1
- Not all of the configured classes get applied?
- Replace kaminari with pagy
- The config editable class params should have side effect to broke gems
- Configured hidden class and popover_destroy command are not applied correctly
- needs to change pagination style
- "PG" Branch
- smart_listing.paginate broke with Ruby 3.1.1 HOT 3
- $(...).smart_listing is not a function HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smart_listing.