Aproxx 14000 points for 1 month data.

-----Original Message-----
From: Andrew Gallant
Sent: 12-07-2014 AM 10:38
To: [email protected]
Subject: Re: [visualization-api] Re: Column chart - Bar color

If the problem is with the chart drawing, then no, minifying your scripts will 
not help.  Approximately how many data points are in your chart?

On Friday, July 11, 2014 10:53:32 PM UTC-4, Nagendra Singh wrote:

Hi,
I think drawing the chart is what taking time. Because when the page loads, the 
indicators and the sliders are generated quickly, but the scatter chart 
displays after 10-12 secs. 

What I was thinking, is there a way to minify my self written js pages. Will 
this help?
 



On Fri, Jul 11, 2014 at 7:12 PM, Andrew Gallant <[email protected]> wrote:
 

How much data is one month's worth?  Thousands of records, millions of records?



You could have any of three main sources of performance problems: 1) your 
server could be slow in querying your data, 2) sending data from server to 
client could be slow, and/or 3) drawing the charts could be slow.  Profile the 
performance of different aspects of your page to determine where the source of 
slowness is, and then you can begin looking for ways to address it.
 


On Friday, July 11, 2014 1:48:08 AM UTC-4, Nagendra Singh wrote:



 
Hi Andrew,



Every thing is working fine. But i need an advice. I have just added only one 
month log files. The first page is displaying very damn slowly. I will share 
the code below. There are three indicators, and the indicator which is red will 
show the graph below. And the rest will be shown onclick next page. 




Please suggest me, what should I do in order to keep the performance high. 
Because in future when the project will be up and running, there will be years 
of log files which the site has to collect and display it. Please help!!!!!!!




Here is the code for my page:








<%@taglib uri="http://www.springframework.org/tags"; prefix="spring"%>

<%@taglib uri="http://www.springframework.org/tags/form"; prefix="sf"%>

<%@taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c"%>

<%@ page session="false" %>

<%@page import="com.minestar.spring.utils.PropertiesReader" %>

<%

PropertiesReader propertiesReader = new PropertiesReader();

propertiesReader.load("siteIndicator.properties");

int bufferCountHigh 
=Integer.parseInt(propertiesReader.getPropertyValue("buffer.high"));
 
double cpuHigh 
=Double.parseDouble(propertiesReader.getPropertyValue("cpu.high"));
 
double memoryHigh 
=Double.parseDouble(propertiesReader.getPropertyValue("memory.high"));




int bufferCountSite = Integer.parseInt(request.getParameter("buffer1"));

double cpuHighSite=Double.parseDouble(request.getParameter("cpu1"));

double cpuMemorySite=Double.parseDouble(request.getParameter("memory1"));
 



boolean b= bufferCountSite>bufferCountHigh;

boolean c= cpuHighSite>cpuHigh;

boolean m= cpuMemorySite>memoryHigh;




boolean b1= bufferCountSite<bufferCountHigh;

boolean c1= cpuHighSite<cpuHigh;

boolean m1= cpuMemorySite<memoryHigh;




/* out.println(b);

out.println(c);

out.println(m);

out.println("-------");

out.println(b1);

out.println(c1);

out.println(m1); */

%>

<html>




<head>

         <title>Scatter Graph</title>

    <link rel="stylesheet" type="text/css" media="all" href="<c:url 
value="/resources/css/styles/li-scroller.css" />">

    <link rel="stylesheet" type="text/css" media="all" href="<c:url 
value="/resources/css/styles/button.css" />">

    <link rel="stylesheet" type="text/css" media="all" href="<c:url 
value="/resources/css/styles/scatterFilter.css" />">

    <%-- <link rel="stylesheet" type="text/css" media="all" href="<c:url 
value="/resources/css/styles/buttons.css" />"> --%>

     <link rel="stylesheet" 
href="//code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css">

    <script type="text/javascript" src="https://www.google.com/jsapi";></script>

    <script 
src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js";></script>

    

    <script src="//code.jquery.com/ui/1.11.0/jquery-ui.js"></script>

    <script src="<c:url value="/resources/js/jquery.li-scroller.1.0.js" />" 
type="text/javascript"></script>

    <script src="<c:url value="/resources/js/googleScatterChart1.js" />" 
type="text/javascript"></script>

    <script src="<c:url value="/resources/js/googleScatterChart2.js" />" 
type="text/javascript"></script>

    <script src="<c:url value="/resources/js/googleScatterChart3.js" />" 
type="text/javascript"></script>

    <script src="<c:url value="/resources/js/googleColumnChart.js" />" 
type="text/javascript"></script>

    <script src="<c:url value="/resources/js/buttons1.js" />" 
type="text/javascript"></script>

    <script src="<c:url value="/resources/js/buttons2.js" />" 
type="text/javascript"></script>

    <script src="<c:url value="/resources/js/buttons3.js" />" 
type="text/javascript"></script>

    <script src="<c:url value="/resources/js/jsDraw2D.js" />" 
type="text/javascript"></script>

    <script src="<c:url value="/resources/js/newWindow.js" />" 
type="text/javascript"></script>

    <script type="text/javascript">

        $(function(){

            $("ul#ticker01").liScroll();

        });

    </script>

  

  <script type="text/javascript">

  $(function(){

  $('#canvas1').mouseover(function(){

    $('#canvas1').css("background-color","lightgray");

  });
 
  $('#canvas1').mouseout(function(){

            $('#canvas1').css("background-color","white");

          });

  });

  </script>

  <script type="text/javascript">

  $(function(){

  $('#canvas2').mouseover(function(){

    $('#canvas2').css("background-color","lightgray");

  });

  $('#canvas2').mouseout(function(){

            $('#canvas2').css("background-color","white");

          });

  });

  </script>

  <script type="text/javascript">

  $(function(){

  $('#canvas3').mouseover(function(){

    $('#canvas3').css("background-color","lightgray");

  });

  $('#canvas3').mouseout(function(){

            $('#canvas3').css("background-color","white");

          });

  });

  </script>

 

</head>

<body>

<p style="text-align:center;"><span 
style="font-family:Times;font-size:22px;font-style:normal;font-weight:bold;text-transform:uppercase;color:FFFFFF;background-color:000000;">indicators
 for : ${siteCode}</span>

</p>




<!-- <div id="ColumnChart" style="width: 1000px; height: 450px;"  
align="center"><h3>Column Chart for all Parameters</h3></div> -->

<!-- <div style="width: 500px; height: 400px;"> -->

<div class="button_con" style="width: 300px; height: 400px; text-align: 
center;">

<div id="canvas1" title="Buffer Indicator">Buffer Count :   ${buffer1}</div>

<div id="canvas2" title="CPU Indicator">Cpu Usage :     ${cpu1}%</div>

<div id="canvas3" title="Memory Indicator">Memory Usage:         
${memory1}%</div>

</div>




<c:if test= "<%=b1 %>">

<script>

$(function() {

    $( '#canvas1' ).tooltip({

        content: "Click Indicator to see Scatter Plot",

        position: { my: "left+140 center", at: "right center" }

    });

  });

  

$( '#canvas1' ).click(function() {

         var indicatorName= 'Buffer';

         var domainName =  window.location.hostname;

         
window.open('http://'+domainName+':8080/RestartSpringRestService/indicator?indicatorName='
 + indicatorName);

});

</script>

</c:if>




<c:if test= "<%=c1 %>">

 <script>
 
$(function() {

    $( '#canvas2' ).tooltip({

        content: "Click Indicator to see Scatter Plot",

        position: { my: "left+140 center", at: "right center" },

        

    });

  });

$( '#canvas2' ).click(function() {

         var indicatorName= 'CPU';

         var domainName =  window.location.hostname;

         
window.open('http://'+domainName+':8080/RestartSpringRestService/indicator?indicatorName='
 + indicatorName);

});

</script>

</c:if>

[The entire original message is not included.]

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to