Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Configuring apache to download .gz files

    Hi,

    Question1:
    We are serving above URL from apache.

    http://apache.cricnjoy.com/simpics/S...rototype2.html

    How can we make your engine download the .gz files of the javascript instead of .js files so that we can see faster download speeds.

    Question2: (Always seems to load the files and IE not caching?)
    I tried to download the above URL in IE and Firefox it is taking around 10-12 seconds before we see the complete application loaded and initialised. Even on refresh it seems to take the same amount of time.

    Question3:
    Is it possible to optimise the .js and .gz files such that we can use only the components that we use. Are there any guidelines if we can do that.
    We want to get the final deployable application footprint as small as possible as our users typically behind the very very low bandwidth.

    Question4:
    Is there anyway we can post some of our queries specific to our product in private posting? As we are providing our prototype links in the public forum.

    Thanks,
    -SK
    Last edited by skota; 6 Nov 2006, 10:45.

    #2
    Question 1 & 2: serving gzipped JS from Apache

    If you plan to deploy the SmartClient server at some point to handle dynamic requests, then you can just configure Apache to allow the SmartClient FileDownload servlet to serve the SmartClient framework, which automatically uses compression and sets HTTP "Expires" headers that avoid redundant downloads.

    If you need to deploy entirely without the SmartClient server, Apache can be configured to serve compressed JS using mod_gzip:

    http://schroepl.net/projekte/mod_gzip/

    .. and can be configured to set "Expires" headers using mod_expires:

    http://httpd.apache.org/docs/2.0/mod/mod_expires.html

    There is a lot of public information about how to do this, however it is fairly involved. If you plan to deploy the SmartClient server at some point in the future anyway, I wouldn't dive into the Apache configuration necessary for delivering compressed JS.

    Question 3: optimizing file size

    Once you've set up compression the download will be approximately 1/6 the size and will occur only once. In terms of trimming:
    • SmartClient is delivered in modules, so load only the modules you need
    • The FileLoader can be used to load or cache SmartClient in the background while the user is logging in or viewing a simple landing page
    • Any kind of moving loading indicator dramatically reduces the percieved wait time

    It is possible for Isomorphic to trim unused components from a build, however, this should generally be attempted only once your application is complete and the full component usage is clear, and generally the gain is quite small, so it's best to focus on the above strategies.

    Question 4: private support

    Customers of Isomorphic have the option of private support channels. If you feel like you are giving too much away on public forums, a typical approach is to isolate the issue to a simpler test file. This will become necessary anyway for troubleshooting as your application becomes larger and more sophisticated.
    Last edited by Isomorphic; 2 Nov 2006, 20:27.

    Comment


      #3
      We will be deploying the files eventually into java application server either in JBoss or Weblogic...

      How does this work in that case? Do you have a plugin or we need to configure anything in web.xml to make this happen?

      Thanks,
      -SK

      Comment


        #4
        deployment instructions in SmartClient Reference

        Hi skota,

        Everything is explained in the Deployment Instructions in the SmartClient Reference, including what files need to be deployed to your application server, descriptions of the behavior of each servlet included in the SmartClient-provided web.xml file, and whether and why you would enable each servlet in a production deployment.

        Let us know if you need more information.

        Comment


          #5
          How to make SmartClient use gzip js files instead of js.

          I have configured my app web.xml to use CompressionFilter, JSSyntaxScannerFilter, NoCacheFilter, FileDownload, MessagingServlet, FileAssembly and PreCache

          And have both gzip and js files, but when I access the page it takes 23 seconds to render the page.

          And the total chunk of js files takes 460KB.

          Please direct us to exact configuration settings and todo stuff to avoid this slowness.

          Comment


            #6
            Actually all JS files are zipped but still rendering is taking almost 15 seconds.

            Used YSlow (cool tool) to figure out the issue

            Empty Cache

            3.0K 1 HTML/Text

            459.4K 12 JavaScript Files

            7.1K 1 Stylesheet File

            0.8K 3 CSS Images

            24.2K 24 Images
            494.7K Total size

            Primed Cache
            41 HTTP requests


            3.0K 1 HTML/Text

            7.3K 12 JavaScript Files

            0.0K 1 Stylesheet File

            0.0K 3 CSS Images

            1.0K 24 Images
            11.5K Total size
            41 HTTP requests
            Weight graphs:

            Comment


              #7
              You probably have incorrect settings for autoDraw. See the docs.

              Comment


                #8
                Set autoDraw to false for all grid components.

                Appreciate if you can give some suggestions on what should look like and what to be done.

                Comment


                  #9
                  Yes, that's what's in the docs. Please don't post again without reading them, thanks.

                  Comment


                    #10
                    Atleast point where the doc is and where it is mentioned.

                    Atleast point where the doc is and where it is mentioned.

                    Thanks.

                    Comment


                      #11
                      Not really a problem to find on your own. All docs are linked at the top of the forums and you can search for anything like autoDraw as was suggested above. Two results that are very helpful are smartArchitecture that has a description of general issues and Canvas.autoDraw with more specifics on using this attribute.

                      The docs are really good and the search capability can help you track down specifics when you are not sure where to look. Give them a try.

                      Comment


                        #12
                        Debug console optimization.

                        Thanks, that helped a lot.

                        I'm seeing in my debug console, does this sound right. Not seeing Grid as it should look like, does it have to do with License expiration??

                        Mouse Event Target : ActiveIssuersChart Focus Target :
                        Last MouseDown Target : [click to add to eval]

                        Canvas Count : 342
                        draw()s : 739 clear()s : 461 redraw()s : 19 destroy()s : 4
                        Eval JS
                        Clear
                        Ruler
                        SmartClient Version: 6.5.1 (expires 2009-03-08 12:23:49.0) Licensed to: xxxx (#687687687687) Log Messages


                        11:20:56.048:INFO:Log:initialized
                        11:21:03.970:WARN:VStack:isc_VStack_64:Adding already drawn widget:isc_Label_62 to new parent:isc_VStack_64. Child has been cleared so it can be drawn inside the new parent. This may be a result of autoDraw being enabled for the child.
                        11:21:03.970:WARN:VStack:isc_VStack_64:Adding already drawn widget:isc_Label_63 to new parent:isc_VStack_64. Child has been cleared so it can be drawn inside the new parent. This may be a result of autoDraw being enabled for the child.
                        11:21:06.330:INFO:Log:isc.Page is loaded
                        1
                        11:22:16.835:TMR2:WARN:Scrollbar:SectorRecapList_body_hscroll:ignoring bad or negative width: -15 [enable 'sizing' log for stack trace]

                        XML Comm Watcher (selection available as 'element' in evals)

                        Evaluate Java (contents run in a JSP)

                        Evaluate XML

                        Literal Text (contents available as 'literalText' in JS evals)

                        Evaluate JS Expression (watch list selection available as 'watched' in evals)
                        Last edited by subashk; 2 Apr 2009, 08:11.

                        Comment


                          #13
                          Subash these log messages are pointing you right to the problem with autoDraw that we previously pointed out:

                          11:21:03.970:WARN:VStack:isc_VStack_64:Adding already drawn widget:isc_Label_62 to new parent:isc_VStack_64. Child has been cleared so it can be drawn inside the new parent. This may be a result of autoDraw being enabled for the child.
                          11:21:03.970:WARN:VStack:isc_VStack_64:Adding already drawn widget:isc_Label_63 to new parent:isc_VStack_64. Child has been cleared so it can be drawn inside the new parent. This may be a result of autoDraw being enabled for the child.
                          Your application does 739 clear()s (as the Developer Console is also pointing out) because of this problem. Why don't you fix this so you aren't waiting multiple seconds for the screen to come up every time?

                          Comment


                            #14
                            Yes, we fixed that and now the debug console looks like this.

                            We are having multiple grid in a layout and the grids show up in Firefox fine, but in IE it has white background on listgrid's header panel.

                            Are we redrawing too many components or this is normal? We have set all widget - autoDraw to false except the top layout.

                            Debug Console:
                            Mouse Event Target : DSTabSet_tabBar Focus Target : dataServicesTab
                            Last MouseDown Target : dataServicesTab [click to add to eval]

                            Canvas Count : 315
                            draw()s : 364 clear()s : 110 redraw()s : 14 destroy()s : 4
                            Eval JS
                            Clear
                            Ruler
                            SmartClient Version: 6.5.1 (expires 2009-03-08 12:23:49.0) Licensed to: xxx(#xxx) Log Messages


                            17:19:56.369:INFO:Log:initialized
                            17:20:06.104:INFO:Log:isc.Page is loaded
                            17:20:09.900:XRP6[E]:WARN:FusionChart:ActiveIssuersChart:src set to: https://xxx.com/HomePage/isomorphic/../FusionCharts/Charts/Pie3D.swf

                            XML Comm Watcher (selection available as 'element' in evals)

                            Evaluate Java (contents run in a JSP)

                            Evaluate XML

                            Literal Text (contents available as 'literalText' in JS evals)

                            Evaluate JS Expression (watch list selection available as 'watched' in evals)


                            dataServicesViewSelector

                            Comment


                              #15
                              You've still got 110 clears, that's not normal. The Developer Console will tell you which components are doing this and why if you only let it :) In addition to the telltale log messages you were seeing before, you can enable the "clears" log category to see which components are clearing.

                              Use the Watch tab to figure out why there would be an unexpected white area. If you need further help, post a screenshot of the visual problem you're seeing.

                              Comment

                              Working...
                              X