jQWidgets Forums

jQuery UI Widgets Forums Grid Grid Date processing non-US date string horrifically slow!

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 6 years, 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author

  • Gwyn
    Participant

    If I set a column as a date and supply a string it tries to parse the string as a date. It’s clearly doing something better than native javascript because it will correctly determine that 29/07/1986 is 29th July 1986. Whereas normal JS will get upset because it’s not in US format..

    So the grid should get kudos for this. However, the first issue is that if I supply two dates in the column 29/07/1986 and 03/05/1986 it determines that the dates are 29th July and 5th March (not 3rd May)! So whilst it’s tried to be helpful actually it isn’t and so it might as well just fail.

    But the biggest issue is that if you do provide a date in non-US format then it is horrifically slow. Processing 8000 dates in non-US format takes 28 seconds on my machine!


    Peter Stoev
    Keymaster

    Hi Gwyn,

    It would be good if you set the cellsformat in your column and the format of the datafield in the source object. By doing that, the Grid and the dataSource will know exactly the date format and will not try to guess the format.

    Regards,
    Peter


    Gwyn
    Participant

    Hi Peter,

    I agree and that’s what I’ve done but the processing is that slow there must be something very unfortunate going on under the scenes so it should probably be fixed/changed. As I said there is no point in what it currently does because if you try and treat dates as US then UK you will end up with inconsistent results and so it is (1) trying to be smarter than is useful and (2) is really slow!!

    It was only by luck that I wondered of perhaps it was date formatting and tried changing the format otherwise I could have spent a loooooong time trying to get to the bottom of this…


    Peter Stoev
    Keymaster

    Hi Gwyn,

    As I wrote, you should use a specific format, otherwise it will try to parse the format by the date object using Regex.

    Regards,
    Peter

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.