Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8039603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:37:28+00:00 2026-06-05T03:37:28+00:00

I have built a RIA on a single page. I am using Dojo 1.7.2.

  • 0

I have built a RIA on a single page. I am using Dojo 1.7.2. The page contains about 200 dijit/NumberSpinners and some TabContainers and TitlePanes. Of course this works perfect in all browsers, except Internet Explorer 8 which is used by the client’s company.

In all browsers the parsing of the whole page takes a few seconds, in IE8 it was 2 minutes, and I got it reduced to 40 seconds by using the following tips:

  • Use custom build
  • Create widgets programmatically instead of declaratively
  • Parse widgets only once they are shown. (this does not speed up the parsing, it only makes the user wait more while using the application instead of before.)
  • Substituting NumberSpinners for NumberTextBox (which reduced the parsing time by half!)

Any other tips? I could try reusing the NumberSpinners and throw them around when a div gets visible, but this requires my application to be rewritten quite substantially.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T03:37:30+00:00Added an answer on June 5, 2026 at 3:37 am

    The situation you are facing is, that very very many nodes are created in the DOM, and programatically. IE has poor performance for this, being held back by the javascript engine. Yikes huh?!

    Your goal is to define as much as possible beforehand as opposed to override this during runtime. By this i mean setting parameters in the data-dojo-props / construct arguments. This especially applies for stuff like onClick handlers etc. You’d achieve this by doing like such:

    var MyConstruct = dojo.define("foo.MyConstruct", [ /* inheritance */ dijit.form.ValidationTextBox ], function() {
          // instead of setting properties during construct, preset those which are possible
          constraints: { min: 0, max: 100 },
          postMixInArguments: function() {
              this.inherited(arguments);    // call widget first
              if(this.constructParameter) ; // act on it
          },
          // implement any overrides you otherwise would need
          // and for minimal runtime overhead, redefine the private version, like _onBlur
          // copy the source and change what you need
          onBlur: function () {
              // an event override example
          }
    });
    

    But; why did NumberSpinners > NumberTextBoxes reduce by 50%? This is why:

    Template TextBox

    <div class="dijit dijitReset dijitInline dijitLeft" id="widget_${id}" role="presentation"
        ><div class="dijitReset dijitInputField dijitInputContainer"
            ><input class="dijitReset dijitInputInner" data-dojo-attach-point='textbox,focusNode' autocomplete="off"
                ${!nameAttrSetting} type='${type}'
        /></div
    ></div>
    

    Template Spinner

    <div class="dijit dijitReset dijitInline dijitLeft"
        id="widget_${id}" role="presentation"
        ><div class="dijitReset dijitButtonNode dijitSpinnerButtonContainer"
            ><input class="dijitReset dijitInputField dijitSpinnerButtonInner" type="text" tabIndex="-1" readonly="readonly" role="presentation"
            /><div class="dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitUpArrowButton"
                data-dojo-attach-point="upArrowNode"
                ><div class="dijitArrowButtonInner"
                    ><input class="dijitReset dijitInputField" value="&#9650;" type="text" tabIndex="-1" readonly="readonly" role="presentation"
                        ${_buttonInputDisabled}
                /></div
            ></div
            ><div class="dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitDownArrowButton"
                data-dojo-attach-point="downArrowNode"
                ><div class="dijitArrowButtonInner"
                    ><input class="dijitReset dijitInputField" value="&#9660;" type="text" tabIndex="-1" readonly="readonly" role="presentation"
                        ${_buttonInputDisabled}
                /></div
            ></div
        ></div
        ><div class='dijitReset dijitValidationContainer'
            ><input class="dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value="&#935;" type="text" tabIndex="-1" readonly="readonly" role="presentation"
        /></div
        ><div class="dijitReset dijitInputField dijitInputContainer"
            ><input class='dijitReset dijitInputInner' data-dojo-attach-point="textbox,focusNode" type="${type}" data-dojo-attach-event="onkeypress:_onKeyPress"
                role="spinbutton" autocomplete="off" ${!nameAttrSetting}
        /></div
    ></div>
    

    There is not much one could do with the TextBox template to optimize it, only entrypoint would be the ${type} parameter which is set using regular exp replacement via _getTypeAttr. in postMixInProps (before _TemplatedMixin runs and generates DOM) the value is overridden into ‘text’ even if anything else is specified. Allthough – not sure how this would implicate – one might want to take away the focusNode + FocusMixin, but i will not go into that.

    There’s a little quirk handling in the dijit/form/MappedTextBox (which creates a hidden <input>, containing the ‘true’ value see http://bugs.dojotoolkit.org/ticket/8660. This has put a regexp replace on ‘this.name’ to fix problems – leaving out the name attribute on your input field will take care of that (if possible use Id instead).

    Template ValidationTextBox

    The main reason for using NumberTextBox would be the range limitation right? In order for that particular module to load, a number of mixins are done – but basically they are based on the ValidationTextBox. This offers a .validate functionality and shows messages if needed. The above note on removing focusmixin will take the messaging out of business since they act on the onBlur events.

    If you were to use ValidationTextBox as opposed to NumberTextBox and implement the range checks by custom functionality i believe it would work wonders. A good deal of eval’d code is run ontop of validationtextbox to make it numbertextboxes – some of which probably is overhead in your case.

    <div class="dijit dijitReset dijitInline dijitLeft"
        id="widget_${id}" role="presentation"
        ><div class='dijitReset dijitValidationContainer'
            ><input class="dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value="&#935; " type="text" tabIndex="-1" readonly="readonly" role="presentation"
        /></div
        ><div class="dijitReset dijitInputField dijitInputContainer"
            ><input class="dijitReset dijitInputInner" data-dojo-attach-point='textbox,focusNode' autocomplete="off"
                ${!nameAttrSetting} type='${type}'
        /></div
    ></div>
    

    a sample override to the validation:

    dijit.byId("validationTextBoxNodeId").validator = function(value, constraints){
    
        // Check that email has not been used yet.
        if(some-checks){
            return true;
        }else{
            return false;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small RIA that I built as a learning/make-my-life-easier project that uses
I have built a mobile app using Rhomobile, jQuery Mobile and Google Maps API.
I have an existing WCF RIA project built on the Release Candidate; I'm now
I have built a one page web application that manipulates a set of data:
I have built a Twitter client that's only one page: index.html. When being used,
I have built a simple StreamGeometry, using MSDN example: StreamGeometry geometry = new StreamGeometry();
I have built a processor using PTLSIM and want to test it, for educational
I have built a local DVD Database using Codeigniter, With film names etc in.
I have built a mock object using EasyMock, and I'm trying to have the
I have built a webpage, splashcreen.html , that when someone loads index.php will automatically

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.