1. #1
    Sencha User
    Join Date
    Dec 2008
    Location
    India
    Posts
    94
    Vote Rating
    0
    nikhilkrishnan is on a distinguished road

      0  

    Default [RESOLVED] Extjs 4 loads almost 2.4 MB of data

    [RESOLVED] Extjs 4 loads almost 2.4 MB of data


    Hi

    I have created a login panel using Extjs 4 and its takes almost 1.5 minutes to download all the files.

    When i checked in the firebug it shows that almost all the files are downloaded. How can i rectify this.. Here is the code I'm using
    Code:
    <link rel="stylesheet" type="text/css" href="resources/css/ext-all.css" />
            <link rel="stylesheet" type="text/css" href="resources/desktop.css" />  
            <style type="text/css">
            html, body {
              height: 100%;
              margin: 0;
              padding: 0;
            }
            </style>               
            <script type="text/javascript" src="extjs/ext.js"></script>
            <script type="text/javascript">
                Ext.require('Ext.form.Panel');
                Ext.require('Ext.Window');
                Ext.onReady(function () {
                    var frmlogin = Ext.create('Ext.form.Panel',{ 
                        labelWidth:100,
                        id:'frmlogin',
                        frame:true, 
                        defaultType:'textfield',
                        bodyStyle:'padding:12px',
                        items:[{ 
                                fieldLabel:'Username',
                                name:'user_name',
                                id:'user_name'
                            },{
                                fieldLabel:'Password',
                                name:'user_pass',
                                inputType:'password'
                            }],
            
                        buttons:[{ 
                                text:'Login',
                                id:'Login',
                                listeners: {
                                    click: loginHandler
                                }
    
                            },{
                                text:'Exit',
                                handler:function(){
                                    window.close();
                                }
                            }]
                    });
                    function loginHandler(){    
                         var redirect = 'desktop.php';     
                                win.hide();
                                window.location = redirect;
                     
                    }
                    var win = create ('Ext.Window',{
                        layout:'fit',
                        width:325,
                        height:150,
                        title:'title will come here', 
                        closable: false,
                        resizable: false,
                        plain: true,
                        border: true,
                        items: [frmlogin]
                    });
                    win.show();          
                });
            </script>

  2. #2
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    7
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    Are you trying to use dynamic loading in production? We strongly advise against that... instead you should use either ext-all.js (minified build) or look at section 3 of http://docs.sencha.com/ext-js/4-0/#!...etting_started for how to create a custom build tuned for your application
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  3. #3
    Sencha User
    Join Date
    Dec 2008
    Location
    India
    Posts
    94
    Vote Rating
    0
    nikhilkrishnan is on a distinguished road

      0  

    Default


    Thank you ed .. I have tried sencha SDK in ubuntu . but its showing 'sencha : Command not found'.

  4. #4
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    7
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    You installed the SDK Tools (http://www.sencha.com/products/sdk-tools/)?
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  5. #5
    Sencha User
    Join Date
    Dec 2008
    Location
    India
    Posts
    94
    Vote Rating
    0
    nikhilkrishnan is on a distinguished road

      0  

    Default


    Yes. Its working now. I had to restart my system..

  6. #6
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    7
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    Great
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  7. #7
    Sencha User in2rd's Avatar
    Join Date
    May 2009
    Location
    Hawaii
    Posts
    11
    Vote Rating
    0
    in2rd is on a distinguished road

      0  

    Default Loading Dependancies in Production Environments

    Loading Dependancies in Production Environments


    Ed:

    Do components also benefit from the Loader as they are created? For example, if I create two xtypes (panel and a grid), and have require statements in their parent, as well as each component, are those loaded at creation?

    I seem to remember this being the case, but not 100% sure. If so, depending on your requirements, that also seems fairly efficient.

    Just a thought.

  8. #8
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    7
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    Not sure I fully understand the question, but in development mode it will synchronously load those dependencies at instantiation time if those classes are not already on the page. In production we turn that off by default because there it should be running on a production build
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

Thread Participants: 2

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi