EVMap icon indicating copy to clipboard operation
EVMap copied to clipboard

Connector switch while in price comparison broken (very slow)

Open Altonss opened this issue 1 year ago • 3 comments

Altonss avatar Aug 23 '22 22:08 Altonss

Hm, I can't reproduce that on my side.

johan12345 avatar Aug 24 '22 17:08 johan12345

It is very slow to switch and during this time both connectors are selected

Altonss avatar Aug 24 '22 19:08 Altonss

This does not happen on all chargers somehow :thinking: I happened for me with this charger for example: "Aire de Hardivilliers, Total EV Charge"...

Altonss avatar Aug 30 '22 13:08 Altonss

This does not happen on all chargers somehow thinking I happened for me with this charger for example: "Aire de Hardivilliers, Total EV Charge"...

On this charger, the following happens:

  • after clicking the new connector, it is correctly selected
  • but the old connector remains selected and with it it's old data
  • after a short time (maybe 1s) only the new connector is selected, at the same time it's data gets displayed

Maybe it would be better to simply select the new connector and display a loading wheel... Idk

Altonss avatar Oct 26 '22 19:10 Altonss

Hm okay, it's usually much faster than 1s for me, but that may depend on the phone. It's not loading any data from the network or local storage though at this point - switching the connector should simply mean displaying different data that's already in the RAM. I think for some reason generating the layout of all those rows for the prices is slow, which causes the CPU to hang...

johan12345 avatar Oct 26 '22 19:10 johan12345

it's usually much faster than 1s for me, but that may depend on the phone

It's strange because my phone is pretty fast :thinking:

Altonss avatar Oct 26 '22 19:10 Altonss

But it's not consistent, it isn't as slow every time. Another charger which is also very slow to switch: Ionity Holiday Inn Calais (FR)

Altonss avatar Oct 26 '22 20:10 Altonss

Ah, I think I found the issue: Due to the way the views were set up in the ChargepriceFragment, it was trying to build the layout for all rows at once, not just for those which are currently visible. That can of course be pretty slow.

johan12345 avatar Oct 26 '22 20:10 johan12345

Thanks a lot for the fix :heart:

Altonss avatar Oct 26 '22 22:10 Altonss