ionic-datepicker icon indicating copy to clipboard operation
ionic-datepicker copied to clipboard

Improvement: android open latency

Open xVishera opened this issue 9 years ago • 16 comments

First of all, congratulations for this awesome component!

I think it can be better, speeding up the open latency on android.

It's taking around 4 secs to open in Asus Zenfone 5.

xVishera avatar Jan 14 '16 16:01 xVishera

Could you help me with that?

celsomarques avatar Jan 18 '16 17:01 celsomarques

For sure!

I gonna make some tests tonight and I'll let you know If I figure out what is slowing the directive!

xVishera avatar Jan 18 '16 17:01 xVishera

I found the problem but can't figure out how to fix it.

The problem is with tempates.js, I don't know if the Android is having problems trying to pre-compile the template cache or taking slowly to store/find it.

If I remove the code from the cache (particulary the parts with 'Expression') it open instantly.

xVishera avatar Jan 18 '16 22:01 xVishera

What do you mean with "'Expression'"?

celsomarques avatar Jan 19 '16 11:01 celsomarques

Like this.

<div class="col datepicker-day-of-month" ng-click="datepickerCtrl.changeType(\'date\')">{{datepickerCtrl.selectedDate | date: \'d\'}}</div>

"'Expression'" = date: \'d\'

xVishera avatar Jan 19 '16 11:01 xVishera

Did you remove only filters or other expressions like ng-click?

celsomarques avatar Jan 19 '16 11:01 celsomarques

Only the filters, I maintained the ng-clicks

xVishera avatar Jan 19 '16 11:01 xVishera

We can try to remove those expressions and move them to JS. For example: {{datepickerCtrl.getSelectedDate()}}

celsomarques avatar Jan 19 '16 12:01 celsomarques

I can do some tests, but only in 2 hours.

Do you want to create a new branch with some implemention and let me test it ?

xVishera avatar Jan 19 '16 12:01 xVishera

I'll try to work on this tomorrow night but it's not guaranteed.

Do you want access as collaborator on this repo? I need some help. :)

celsomarques avatar Jan 19 '16 12:01 celsomarques

For sure!

I will try to make some improvements, like a format tag to use your directive directly on input fields instead of a button!

xVishera avatar Jan 19 '16 12:01 xVishera

Done! Thx!!!

celsomarques avatar Jan 19 '16 12:01 celsomarques

Hi guys! Any updates about this? ;)

HugoHeneault avatar Feb 26 '16 16:02 HugoHeneault

Not yet, sorry dude.

@xVishere, any updates?

celsomarques avatar Mar 11 '16 19:03 celsomarques

Sorry for being late, I didn't worked on this git for a while, I gonna split the templates from the cache to get the better performance and submit a push tonight.

xVishera avatar Mar 11 '16 20:03 xVishera

@xVishera any news about this?

celsomarques avatar Apr 28 '16 23:04 celsomarques