1

I am working on my meteorjs project. I want to publish and display around 4000 category and subcategory from mongodb collection. But it takes too much time to load Data. I want to develop similar functionality as Alibaba all category page. because it loads all data in no time.

http://www.alibaba.com/Products?spm=a2700.7224109.1997230041.14.K2vAog

Dharmik
  • 369
  • 4
  • 11
  • 1
    You shouldn't load so much data from database on every request, since it produces a lot of load. Use caching for rendered page: memcached or redis might help. – Yaroslav Admin Oct 14 '15 at 13:05

2 Answers2

2

A common answer to the question about how to make your initial page load faster is to use the fast-render package. It sounds applicable to your use case.

4000 categories and subcategories at say 40 bytes apiece average should only be 160kB, the size of a medium jpeg. It's not really that much data.

Have you profiled your application in the inspector to see how your application is actually loading and what might be blocking?

Michel Floyd
  • 18,793
  • 4
  • 24
  • 39
  • Not working. it takes approx 3 minute load 4000 record on server. – Dharmik Oct 23 '15 at 04:30
  • 1
    You've got other problems then. How big is each document? Is the search you're running indexed? 4000 documents is not quite "big data!" – Michel Floyd Oct 23 '15 at 06:01
  • yes i am already using indexing in document.In my local machine only 6 second prepare whole page, but in server its take more than 1 minute for the same. so i think its server issue, can you please suggest what is the exact solution. – Dharmik Nov 04 '15 at 05:52
  • You need some instrumentation to figure this out. Have you looked at [Kadira](https://atmospherejs.com/meteorhacks/kadira)? – Michel Floyd Nov 04 '15 at 15:51
-1
  1. Use compression algorithm: 'gzip' on the server to dispatch your response from the server, it reduced your bandwidth cost and clients get the response faster due to compact size.
  2. Make your UI loaded completely then step-up with ‘ajax compleately asyinc ‘ improve your user experience
  3. Don’t fill the page with tones of html css scripts etc.