Now my problem is that graph take too much time to upload.
Due to which this page take too much time to load.
Please tell me any method so that my graph load in the last but other
data will display.
You can use JavaScript to lazy-load the graph, as long as there is no
legal requirement that the graph be universally available, since it will
just not load in the absence of a scripted client. Note that Google will
skip it as well, if that matters to you.
Refactor your graph code so you can request the graph from its own URL,
then use an Ajax request to load it asynchronously into the page.
Using Prototype, put the following in a script block below the div where
your graph will appear:
new Ajax.Updater(‘div_where_the_graph_goes’, ‘url/to/the/graph’);
For extra credit, add an inline placeholder div within your
div_where_the_graph_goes element, with its background set to a loading
spinner GIF. This will be replaced when the Updater finishes.
Walter
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.