Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance issues with the new label screen #819

Closed
shankari opened this issue Oct 20, 2022 · 51 comments
Closed

Performance issues with the new label screen #819

shankari opened this issue Oct 20, 2022 · 51 comments

Comments

@shankari
Copy link
Contributor

Performance issues with the new label screen

Hanging not scrolling maps not loading All trips not getting filled in slow Address is visible but not other fields
hanging_not_scrolling_maps_not_loading all_trips_not_getting_filled_in_slow address_is_visible_but_not_other_fields
@shankari
Copy link
Contributor Author

Multiple calls to reading from server Not hanging any more go to 'to label' and then back to 'all trips', slow loading again
time_delayed_multiple_calls_to_reading_from_server not_hanging_any_more slow_loading_after_going_to_label_and_going_back

@shankari
Copy link
Contributor Author

I suspect that the reason behind this is that we are loading the data in the directive, which slows down the data load overall.

  .controller("TripItemCtrl", function($scope, $injector, $ionicPlatform,
...
    $scope.mapLimiter.schedule(() =>
    Timeline.confirmedTrip2Geojson($scope.trip).then((tripgj) => {
....
    })
    );

@shankari
Copy link
Contributor Author

Here's what I see in the logs around 12:30. Lots of calls to configReady from the multilabel ctrl, although it returns immediately.

1491012,1665689346.115,2022-10-13T12:29:06.115000-07:00,js : UI_CONFIG: about to call configReady function in MultiLabelCtrl
1491013,1665689346.123,2022-10-13T12:29:06.123000-07:00,"js : UI_CONFIG in configReady function, resolving immediately"
....
1491126,1665689346.623,2022-10-13T12:29:06.623000-07:00,js : UI_CONFIG: about to call configReady function in MultiLabelCtrl
1491127,1665689346.627,2022-10-13T12:29:06.627000-07:00,"js : UI_CONFIG in configReady function, resolving immediately"

Bunch of calls to read the location for the delayed walk check

1491130,1665689397.475,2022-10-13T12:29:57.475000-07:00,OPGeofenceWalkExitWorker : Initiating delayed read for walking transition
1491135,1665689399.581,2022-10-13T12:29:59.581000-07:00,OPGeofenceWalkExitWorker : Initiating delayed read for walking transition
1491150,1665689400.005,2022-10-13T12:30:00.005000-07:00,OPGeofenceWalkExitWorker : Initiating delayed read for walking transition
...

Filtering all those calls out, we get

1491526,1665689444.988,2022-10-13T12:30:44.988000-07:00,js : About to pull location data for range Sat Sep 24 2022 09:09:12 GMT-0700 -> Sat Sep 24 2022 09:53:30 GMT-0700
1491931,1665689510.4229999,2022-10-13T12:31:50.423000-07:00,js : About to pull location data for range Mon Sep 19 2022 16:36:22 GMT-0700 -> Mon Sep 19 2022 17:05:55 GMT-0700

1491534,1665689447.561,2022-10-13T12:30:47.561000-07:00,CommunicationHelper : Got response org.apache.http.message.BasicHttpResponse@31b3c3 with status HTTP/1.1 200 OK
1491937,1665689510.941,2022-10-13T12:31:50.941000-07:00,CommunicationHelper : Got response org.apache.http.message.BasicHttpResponse@61548e1 with status HTTP/1.1 200 OK

Each individual call does not appear to be too slow, but the combined calls take two minutes to complete.

1492838,1665689558.678,2022-10-13T12:32:38.678000-07:00,js : About to pull location data for range Mon Oct 10 2022 18:24:31 GMT-0700 -> Mon Oct 10 2022 18:37:28 GMT-0700

We then call configReady multiple times

1494058,1665689731.234,2022-10-13T12:35:31.234000-07:00,js : UI_CONFIG: about to call configReady function in MultiLabelCtrl

which is presumably when we switched back to "To Label". By putting the data load into the directive, we ensure that we read the data again

1494965,1665689893.373,2022-10-13T12:38:13.373000-07:00,js : About to pull location data for range Mon Sep 19 2022 16:36:22 GMT-0700 -> Mon Sep 19 2022 17:05:55 GMT-0700

Some of the other logs related to this are with console.log. Let's see how they show up in the emulator.

@shankari
Copy link
Contributor Author

shankari commented Oct 20, 2022

About to return message {"key_list":["manual/mode_confirm"],"start_time":1437607722.997,"end_time":1666290660,"key_time":"metadata.write_ts"} 
About to return message {"key_list":["manual/purpose_confirm"],"start_time":1437607722.997,"end_time":1666290660,"key_time":"metadata.write_ts"}

calling readDataFromServer with {"fromBottom":2441,"reachedEnd":false,"pipelineRange":{"end_ts":1437607732.997,"start_ts":1437578093.881},"currentEnd":1437607732.997}

About to return message {"key_list":["analysis/confirmed_trip"],"start_time":1437002932.997,"end_time":1437607732.997,"key_time":"data.end_ts"}

DEBUG:After adding batch of size 6 cumulative size = 6 (index.html, line 154)
DEBUG:Oldest trip in batch starts at 1437578093 pipeline starts at 1437578093 reached end (index.html, line 154)

Trip Item Controller called
Trip before tripgj transformation

Trip Item Controller called
Trip before tripgj transformation
...
Invoked multilabel directive controller for labels MODE,PURPOSE
During initialization, trip is ...
...
Finished initializing directive, userInputDetails
About to pull location data for range Wed Jul 22 2015 08:14:53 GMT-0700 -> Wed Jul 22 2015 09:23:34 GMT-0700
Tripgj in Trip Item Ctrl is

This doesn't have timestamps so it doesn't tell us when the directives finish initializing.

@shankari
Copy link
Contributor Author

Tried to reproduce in the emulator with all logs, and it is not 100% clear that the directive creation is the problem.
We definitely appear to start creating directives even while the trip trajectories are still being read.
Is the problem instead that we are using ng-repeat instead of collection-repeat?

Let's try changing that and see how it works.

Here's where the list controller is initialized

2022-10-20 11:46:03.765691-0700 em-devapp[8945:4701679] Creating MultiLabelService
2022-10-20 11:46:03.765829-0700 em-devapp[8945:4701679] controller InfiniteDiaryListCtrl called

Read the range

2022-10-20 11:46:04.150125-0700 em-devapp[8945:4701679] DEBUG: postToHost called with url = http://localhost:8080/pipeline/get_range_ts
2022-10-20 11:46:05.518799-0700 em-devapp[8945:4701679] CommunicationHelper.execute called!

Read all the inputs

2022-10-20 11:46:06.167083-0700 em-devapp[8945:4701679] About to return message {"key_list":["manual/mode_confirm"],"start_time":1437607722.997,"end_time":1666291575,"key_time":"metadata.write_ts"}
2022-10-20 11:46:06.167275-0700 em-devapp[8945:4701679] CommunicationHelper.execute called!

2022-10-20 11:46:06.820035-0700 em-devapp[8945:4701679] About to return message {"key_list":["manual/purpose_confirm"],"start_time":1437607722.997,"end_time":1666291575,"key_time":"metadata.write_ts"}
2022-10-20 11:46:06.820423-0700 em-devapp[8945:4701679] CommunicationHelper.execute called!

2022-10-20 11:46:08.535650-0700 em-devapp[8945:4701679] About to return message {"key_list":["analysis/confirmed_trip"],"start_time":1437002932.997,"end_time":1437607732.997,"key_time":"data.end_ts"}
2022-10-20 11:46:08.535827-0700 em-devapp[8945:4701679] CommunicationHelper.execute called!

2022-10-20 11:46:08.912318-0700 em-devapp[8945:4701679] DEBUG:Received batch of size 6
2022-10-20 11:46:08.912535-0700 em-devapp[8945:4701679] DEBUG: Received batch of size 6

Matching against unprocessed trips

2022-10-20 11:46:08.918740-0700 em-devapp[8945:4701679] Input list =
2022-10-20 11:46:08.918931-0700 em-devapp[8945:4701679] In getUserInputForTripStartEnd, no potential candidates, returning []:undefined
2022-10-20 11:46:08.932894-0700 em-devapp[8945:4701679] In getUserInputForTripStartEnd, no potential candidates, returning []: <null>

List has loaded

2022-10-20 11:46:08.938136-0700 em-devapp[8945:4701679] DEBUG: Broadcasting infinite scroll complete

Started creating trip items

2022-10-20 11:46:08.957160-0700 em-devapp[8945:4701679] Trip Item Controller called
2022-10-20 11:46:09.487718-0700 em-devapp[8945:4701679] Trip Item Controller called

Started reading location data in parallel

2022-10-20 11:46:09.488991-0700 em-devapp[8945:4701679] DEBUG:About to pull location data for range Wed Jul 22 2015 08:14:53 GMT-0700 -> Wed Jul 22 2015 09:23:34 GMT-0700
2022-10-20 11:46:09.489155-0700 em-devapp[8945:4701679] DEBUG: About to pull location data for range Wed Jul 22 2015 08:14:53 GMT-0700 -> Wed Jul 22 2015 09:23:34 GMT-0700

Started and finished creating directives

2022-10-20 11:46:11.532917-0700 em-devapp[8945:4701679] Invoked multilabel directive controller for labels MODE,PURPOSE
2022-10-20 11:46:11.535945-0700 em-devapp[8945:4701679] Finished initializing directive, userInputDetails =  [object Object],[object Object]
2022-10-20 11:46:11.538657-0700 em-devapp[8945:4701679] Finished initializing directive, userInputDetails =  [object Object],[object Object]

Some location reads were launched after that

2022-10-20 11:46:12.464110-0700 em-devapp[8945:4701679] DEBUG:About to pull location data for range Wed Jul 22 2015 13:25:48 GMT-0700 -> Wed Jul 22 2015 13:53:13 GMT-0700
2022-10-20 11:46:12.464341-0700 em-devapp[8945:4701679] DEBUG: About to pull location data for range Wed Jul 22 2015 13:25:48 GMT-0700 -> Wed Jul 22 2015 13:53:13 GMT-0700

@shankari
Copy link
Contributor Author

Changing to collection-repeat ends up making it very ugly and not loading the maps. I guess we do have to go back to ng-repeat

Screen Shot 2022-10-20 at 7 13 52 PM

@shankari
Copy link
Contributor Author

shankari commented Oct 21, 2022

And arguably, moving the code to display the directive into the directive is the right thing to do structurally.
Wait but I think we do.

So basically, the list should be in charge of reading the trips and the directive should fill in the trip information.

Let's move it out and see if it helps before deciding how to proceed.

@shankari
Copy link
Contributor Author

Ok, so I now know why "Address is visible but not other fields"
#819 (comment)

It is because we wait until we get the trip back and then we populate the value that is actually referred to in the template

    $scope.tripgj = $scope.trip;
                    <div
                        class="diary-distance-time"
                        translate=".distance-in-time"
                        translate-value-distance="{{ tripgj.display_distance }} {{tripgj.display_distance_suffix }}"
                        translate-value-time="{{ tripgj.display_time }}">
                    </div>

Simply assigning that earlier or just using trip in the template will fix that.

@shankari
Copy link
Contributor Author

shankari commented Oct 21, 2022

Looking at the logs, moving the code to read the entries outside the directive does not seem to load the trajectories sooner.

[Log] About to return message {"key_list":["analysis/confirmed_trip"],"start_time":1437002932.997,"end_time":1437607732.997,"key_time":"data.end_ts"} 
[Log] DEBUG:Received batch of size 6
...
[Log] DEBUG:After adding batch of size 6 cumulative size = 6
[Log] DEBUG:Oldest trip in batch starts at 1437578093 pipeline starts at 1437578093 reached end
...
[Log] Trip Item Controller called
[Log] Trip Item Controller called
...
Invoked multilabel directive controller for labels MODE,PURPOSE
...
[Log] Finished initializing directive, userInputDetails =  – [Object, Object] (2)
[Object, Object]Array (2)
[Log] During initialization, trip is  – {end_loc: {type: "Point", coordinates: [-122.0862974, 37.3908925]}, source: "DwellSegmentationTimeFilter", start_loc: {type: "Point", coordinates: [-122.0820411, 37.3920436]}, …}
{end_loc: {type: "Point", coordinates: [-122.0862974, 37.3908925]}, source: "DwellSegmentationTimeFilter", start_loc: {type: "Point", coordinates: [-122.0820411, 37.3920436]}, user_input: {}, duration: 293.5169999599457, …}Object
[Log] Finished initializing directive, userInputDetails =  – [Object, Object] (2)
[Object, Object]Array (2)0 {labeltext: ".mode", choosetext: ".choose-mode", width: "col-50", key: "manual/mode_confirm", otherVals: {}, …}Object1 {labeltext: ".purpose", choosetext: ".choose-purpose", width: "col-50", key: "manual/purpose_confirm", otherVals: {}, …}ObjectArray Prototype
[Log] DEBUG:About to pull location data for range Wed Jul 22 2015 16:00:26 GMT-0700 -> Wed Jul 22 2015 16:28:52 GMT-0700

Let's first try with leaving the code that reads the data in the directive, but change everything to just use the trip object.

@shankari
Copy link
Contributor Author

Code to move to the list (if we need it again) is attached here:
move_to_list.patch.gz

@shankari
Copy link
Contributor Author

Waiting to see if this actually works

@shankari
Copy link
Contributor Author

shankari commented Oct 21, 2022

Another issue that I just thought of is that putting the retrieval into the directive means that the data will be reloaded every time the directives are recreated. This is acceptable if we are recreating the values after a full reload, but as we switch between "To Label" and "All Trips", we have the same trips, but the displayTrips variable is changed, so the directives will change and we will need to reload the data.

1491931,1665689510.4229999,2022-10-13T12:31:50.423000-07:00,js : About to pull location data for range Mon Sep 19 2022 16:36:22 GMT-0700 -> Mon Sep 19 2022 17:05:55 GMT-0700
... switch ...
1494965,1665689893.373,2022-10-13T12:38:13.373000-07:00,js : About to pull location data for range Mon Sep 19 2022 16:36:22 GMT-0700 -> Mon Sep 19 2022 17:05:55 GMT-0700

We can add a fairly simple fix, in which we check to see if the trajectory has been retrieved before we try to re-retrieve it, but that will not solve the problem with outstanding requests in the scheduler.

This is almost certainly the reason why we get the hang in "All Trips" and the delayed "Reading from server" calls. There were pending requests from the "To Label" that needed to be resolved before we started loading in all trips.

I checked the bottleneck library and there does not appear to be a way to cancel in-flight requests.
https://www.npmjs.com/package/bottleneck#stop

So maybe the best option is to retrieve in the list view after all.

@shankari
Copy link
Contributor Author

Running this in the emulator, we get

Error: Maximum call stack size exceeded.
equals@ionic://localhost/_app_file_/Users/kshankar/Library/Developer/CoreSimulator/Devices/181596B5-9D24-40BD-9D93-C6D93038ACF6/data/Containers/Data/Application/7AC9801C-42C1-4189-A8DE-A37FC5AEE306/Library/NoCloud/phonegapdevapp/www/lib/ionic/js/ionic.bundle.js:14431:22

After restarting, we get

Error: Maximum call stack size exceeded.
equals@ionic://localhost/_app_file_/Users/kshankar/Library/Developer/CoreSimulator/Devices/181596B5-9D24-40BD-9D93-C6D93038ACF6/data/Containers/Data/Application/7AC9801C-42C1-4189-A8DE-A37FC5AEE306/Library/NoCloud/phonegapdevapp/www/lib/ionic/js/ionic.bundle.js:14427:16
equals@ionic://localhost/_app_file_/Users/kshankar/Library/Developer/CoreSimulator/Devices/181596B5-9D24-40BD-9D93-C6D93038ACF6/data/Containers/Data/Application/7AC9801C-42C1-4189-A8DE-A37FC5AEE306/Library/NoCloud/phonegapdevapp/www/lib/ionic/js/ionic.bundle.js:14447:20

where the line is

14421 function equals(o1, o2) {
14422   if (o1 === o2) return true;
...
14426   if (t1 == t2 && t1 == 'object') {
14427     if (isArray(o1)) {
14428       if (!isArray(o2)) return false;
14429       if ((length = o1.length) == o2.length) {
14430         for (key = 0; key < length; key++) {
14431           if (!equals(o1[key], o2[key])) return false;
14432         }
14433         return true;
14434       }
...
14445       for (key in o1) {
14446         if (key.charAt(0) === '$' || isFunction(o1[key])) continue;
14447         if (!equals(o1[key], o2[key])) return false;
14448         keySet[key] = true;
14449       }
..
}

@shankari
Copy link
Contributor Author

This seems to happen between

[Log] Trip's Date is  – "Wed 22 Jul 15"
[Log] Trip in Trip Item Ctrl is  – {end_loc: {type: "Point", coordinates: [-122.0862601, 37.3909372]}, source: "DwellSegmentationTimeFilter", start_loc: {type: "Point", coordinates: [-122.0823243, 37.3793178]}, …}
{end_loc: {type: "Point", coordinates: [-122.0862601, 37.3909372]}, source: "DwellSegmentationTimeFilter", start_loc: {type: "Point", coordinates: [-122.0823243, 37.3793178]}, user_input: {}, duration: 1706.7014048099518, …}Object
...
[Log] Invoked multilabel directive controller for labels MODE,PURPOSE (index.html, line 154, x6)
[Log] During initialization, trip is  – {end_loc: {type: "Point", coordinates: [-122.0820411, 37.3920436]}, source: "DwellSegmentationTimeFilter", start_loc: {type: "Point", coordinates: [-122.0876886, 37.3887767]}, …} (index.html, line 154)
{end_loc: {type: "Point", coordinates: [-122.0820411, 37.3920436]}, source: "DwellSegmentationTimeFilter", start_loc: {type: "Point", coordinates: [-122.0876886, 37.3887767]}, user_input: {}, duration: 4120.635999917984, …}Object
[Log] Finished initializing directive, userInputDetails =  – [Object, Object] (2) (index.html, line 154)
[Object, Object]Array (2)
...
[Error] Error: Maximum call stack size exceeded.
equals@ionic://localhost/_app_file_/Users/kshankar/Library/Developer/CoreSimulator/Devices/181596B5-9D24-40BD-9D93-C6D93038ACF6/data/Containers/Data/Application/7AC9801C-42C1-4189-A8DE-A37FC5AEE306/Library/NoCloud/phonegapdevapp/www/lib/ionic/js/ionic.bundle.js:14427:16
...
equals@ionic://localhost/_app_file_/Users/kshankar/Library/Developer/CoreSimulator/Devices/181596B5-9D24-40BD-9D93-C6D93038ACF6/data/Containers/Data/Application/7AC9801C-42C1-4189-A8DE-A37FC5AEE306/Library/NoCloud/phonegapdevapp/www/lib/ionic/js/ionic.bundle.js:14447:20
	(anonymous function) (index.html:154)
	(anonymous function) (ionic.bundle.js:23507)
	$digest (ionic.bundle.js:30257)
	$apply (ionic.bundle.js:30503)
	done (ionic.bundle.js:24824)
	completeRequest (ionic.bundle.js:25022)
	requestLoaded (ionic.bundle.js:24963)

@shankari
Copy link
Contributor Author

shankari commented Oct 21, 2022

It looks like this is from the HTML/$apply. Let's start my commenting out my $apply
Commented out, no change; not related to my changes

@shankari
Copy link
Contributor Author

shankari commented Oct 21, 2022

git revert 465f917a4b02a8d0c5a50eca16867052a2c96a55 (e-mission/e-mission-phone#897) fixes it.
But then we don't have the changes to fix the date. Let's spend some time seeing if we can fix it.

@shankari
Copy link
Contributor Author

Through experimenting with removing code, I can confirm that

            trip.nextTrip = ctList[tIndex+1];
            trip.prevTrip = {display_date: trip.display_date};

works and

            trip.nextTrip = ctList[tIndex+1];
            if (tIndex == 0) {
              trip.prevTrip = {display_date: trip.display_date};
            } else {
              trip.prevTrip = ctList[tIndex-1];
            }

does not

commenting that out (so that we will be able to push this out).
Filed #823 for the final fix

@shankari
Copy link
Contributor Author

shankari commented Oct 24, 2022

Pushed out the changes, still did not fix it.

On android phones, "To label" works pretty well
"All trips" is very slow and does not load any trajectories beyond the ones loaded in "To Label"

On the staging iPhone (iPhone 7), starting the app hangs on "To Label"
There are no trajectories displayed.

I checked the server logs, and here's what I see (modified slightly to match the START and END timestamps, with lines indicating the batches. It looks like actual calls were only milliseconds long, so that should not be the reason why anything hung.
It is also illustrative that it started hanging after making 9 calls to the server although there are supposedly 39 trips to label.

2022-10-24 02:47:03,999:DEBUG:140428359948032:START POST /pipeline/get_range_ts
--
2022-10-24 02:47:04,011:DEBUG:140428359948032:END POST /pipeline/get_range_ts <uuid>

2022-10-24 02:47:04,163:DEBUG:140427512510208:START POST /profile/update
2022-10-24 02:47:04,170:DEBUG:140427512510208:END POST /profile/update <uuid> 0.007329702377319336

2022-10-24 02:47:04,224:DEBUG:140428060722944:START POST /profile/update
2022-10-24 02:47:04,231:DEBUG:140428060722944:END POST /profile/update <uuid> 0.007088422775268555

2022-10-24 02:47:04,313:DEBUG:140427940312832:START POST /datastreams/find_entries/timestamp
2022-10-24 02:47:04,336:DEBUG:140427940312832:END POST /datastreams/find_entries/timestamp <uuid> 0.02295851707458496

2022-10-24 02:47:04,353:DEBUG:140427929822976:START POST /datastreams/find_entries/timestamp
2022-10-24 02:47:04,376:DEBUG:140427929822976:END POST /datastreams/find_entries/timestamp <uuid> 0.022701501846313477

2022-10-24 02:47:04,664:DEBUG:140428359948032:START POST /datastreams/find_entries/timestamp
2022-10-24 02:47:04,708:DEBUG:140428359948032:END POST /datastreams/find_entries/timestamp <uuid> 0.04332733154296875

-----------------------------------------

2022-10-24 02:47:05,663:DEBUG:140427512510208:START POST /datastreams/find_entries/timestamp
2022-10-24 02:47:05,973:DEBUG:140427512510208:END POST /datastreams/find_entries/timestamp <uuid> 0.31002092361450195

2022-10-24 02:47:05,764:DEBUG:140427971782400:START POST /datastreams/find_entries/timestamp
2022-10-24 02:47:06,064:DEBUG:140427971782400:END POST /datastreams/find_entries/timestamp <uuid> 0.29943156242370605

2022-10-24 02:47:05,867:DEBUG:140428060722944:START POST /datastreams/find_entries/timestamp
2022-10-24 02:47:06,153:DEBUG:140428060722944:END POST /datastreams/find_entries/timestamp <uuid> 0.2857527732849121

----------------------------------------

2022-10-24 02:47:09,465:DEBUG:140427929822976:START POST /datastreams/find_entries/timestamp
2022-10-24 02:47:09,719:DEBUG:140427929822976:END POST /datastreams/find_entries/timestamp <uuid> 0.2535982131958008

2022-10-24 02:47:09,488:DEBUG:140427982272256:START POST /datastreams/find_entries/timestamp
2022-10-24 02:47:09,839:DEBUG:140427982272256:END POST /datastreams/find_entries/timestamp <uuid> 0.350186824798584

2022-10-24 02:47:09,490:DEBUG:140428359948032:START POST /datastreams/find_entries/timestamp
2022-10-24 02:47:09,845:DEBUG:140428359948032:END POST /datastreams/find_entries/timestamp <uuid> 0.35550594329833984

------------------------------------

I wonder if it is the bottleneck library that is causing the problems...

@shankari
Copy link
Contributor Author

shankari commented Oct 24, 2022

Tried on my personal android phone. We made 23 calls

grep START.*datastreams /tmp/android_phone.log | wc -l
      23

There are 20 trips (all labeled), so, including the calls to read mode and purpose, that seems pretty decent.
And everything is working with "All Trips"

Next, let's load some more trips in "To Label":
Now we should have 39 trips. We have 39 calls, but we have two update calls and a get_range_ts, so we should have more...

"All labels" now shows all trajectories but does not load map tiles.

Load some more data:
Get one call to the server,

2022-10-24 05:10:23,090:DEBUG:139999079032576:START POST /datastreams/find_entries/timestamp
2022-10-24 05:10:23,275:DEBUG:139999079032576:END POST /datastreams/find_entries/timestamp <uuid> 0.1849372386932373

UI hung for a while, then went to the detail screen.
Coming back, all maps and trips are visible.
still at 39 trips.

Loaded even more trips; now displaying 58 trips. Only one more call to the server; to read the trips. No more trajectory calls, all maps are grayed out.

2022-10-24 05:13:21,770:DEBUG:139999318673152:START POST /datastreams/find_entries/timestamp
2022-10-24 05:13:21,778:DEBUG:139999318673152:curr_query = {'invalid': {'$exists': False}, 'user_id': UUID('<uuid>'), '$or': [{'metadata.key': 'analysis/confirmed_trip'}], 'data.end_ts': {'$lte': 1665288733, '$gte': 1664683933}}, sort_key = data.end_ts
2022-10-24 05:13:21,804:DEBUG:139999318673152:END POST /datastreams/find_entries/timestamp <uuid> 0.033917903900146484

Ah wait! 5 mins later, we get a couple of other calls

2022-10-24 05:17:05,543:DEBUG:139788248131328:START POST /datastreams/find_entries/timestamp
2022-10-24 05:17:05,553:DEBUG:139788248131328:curr_query = {'invalid': {'$exists': False}, 'user_id': UUID('<uuid>'), '$or': [{'metadata.key': 'analysis/recreated_location'}], 'data.ts': {'$lte': 1665277689, '$gte': 1665275735.3591182}}, sort_key = data.ts
2022-10-24 05:17:05,737:DEBUG:139788248131328:END POST /datastreams/find_entries/timestamp <uuid> 0.19478058815002441

2022-10-24 05:17:10,964:DEBUG:139787820328704:START POST /datastreams/find_entries/timestamp
2022-10-24 05:17:10,975:DEBUG:139787820328704:curr_query = {'invalid': {'$exists': False}, 'user_id': UUID('<uuid>'), '$or': [{'metadata.key': 'analysis/recreated_location'}], 'data.ts': {'$lte': 1665191325.841, '$gte': 1665190705.050864}}, sort_key = data.ts
2022-10-24 05:17:11,148:DEBUG:139787820328704:END POST /datastreams/find_entries/timestamp <uuid>

@shankari
Copy link
Contributor Author

shankari commented Oct 24, 2022

And then a couple of minutes later, we see a bunch of others

2022-10-24 05:19:10,689:DEBUG:139999705995008:START POST /datastreams/find_entries/timestamp
2022-10-24 05:19:10,916:DEBUG:139999705995008:END POST /datastreams/find_entries/timestamp <uuid> 0.22726702690124512
2022-10-24 05:19:12,853:DEBUG:139999329163008:START POST /datastreams/find_entries/timestamp
2022-10-24 05:19:13,047:DEBUG:139999329163008:END POST /datastreams/find_entries/timestamp <uuid> 0.19348907470703125
2022-10-24 05:19:14,786:DEBUG:139787809838848:START POST /datastreams/find_entries/timestamp
...
2022-10-24 05:19:54,053:DEBUG:139788290090752:START POST /datastreams/find_entries/timestamp
2022-10-24 05:19:54,261:DEBUG:139788290090752:END POST /datastreams/find_entries/timestamp <uuid> 0.20758509635925293

Trajectories filled in now, but we got an SSL error while connecting to the server as well.

@shankari
Copy link
Contributor Author

shankari commented Oct 24, 2022

Pressed one more time,

2022-10-24 05:24:17,956:DEBUG:139788248131328:START POST /datastreams/find_entries/timestamp
2022-10-24 05:24:17,968:DEBUG:139788248131328:curr_query = {'invalid': {'$exists': False}, 'user_id': UUID('<uuid>'), '$or': [{'metadata.key': 'analysis/confirmed_trip'}], 'data.end_ts': {'$lte': 1664735077, '$gte': 1664130277}}, sort_key = data.end_ts
2022-10-24 05:24:17,996:DEBUG:139788248131328:END POST /datastreams/find_entries/timestamp <uuid> 0.039687156677246094

And again, there were no trajectory loads for close to 15 mins - when I launched the app 15 mins later, suddenly all of them were dispatched.

2022-10-24 05:40:08,119:DEBUG:139788290090752:START POST /datastreams/find_entries/timestamp
2022-10-24 05:40:08,322:DEBUG:139788290090752:END POST /datastreams/find_entries/timestamp <uuid> 0.20329880714416504
2022-10-24 05:40:11,149:DEBUG:139999318673152:START POST /datastreams/find_entries/timestamp
2022-10-24 05:40:11,333:DEBUG:139999318673152:END POST /datastreams/find_entries/timestamp <uuid> 0.1843874454498291

This definitely seems to indicate some issue with the bottleneck library.
Let's try to load one more set of entries and make sure that the app is in the foreground all the time to rule out background issues.

Pressing the button again at :45

@shankari
Copy link
Contributor Author

shankari commented Oct 24, 2022

Reading the confirmed trip

2022-10-24 05:45:12,863:DEBUG:139787820328704:START POST /datastreams/find_entries/timestamp
2022-10-24 05:45:12,873:DEBUG:139787820328704:curr_query = {'invalid': {'$exists': False}, 'user_id': UUID('<uuid>'), '$or': [{'metadata.key': 'analysis/confirmed_trip'}], 'data.end_ts': {'$lte': 1664142441.747, '$gte': 1663537641.747}}, sort_key = data.end_ts
2022-10-24 05:45:12,900:DEBUG:139787820328704:END POST /datastreams/find_entries/timestamp <uuid> 0.03741884231567383

Kept the app in the foreground and ~ 5 mins later, the trajectory calls started

2022-10-24 05:50:17,894:DEBUG:139787809838848:START POST /datastreams/find_entries/timestamp
2022-10-24 05:50:18,094:DEBUG:139787809838848:END POST /datastreams/find_entries/timestamp <uuid> 0.2002885341644287
2022-10-24 05:50:19,514:DEBUG:139999339652864:START POST /datastreams/find_entries/timestamp
2022-10-24 05:50:19,694:DEBUG:139999339652864:END POST /datastreams/find_entries/timestamp <uuid> 0.17978644371032715

Pressed the button again at x:52

2022-10-24 05:52:24,598:DEBUG:139999079032576:START POST /datastreams/find_entries/timestamp
2022-10-24 05:52:24,628:DEBUG:139999079032576:END POST /datastreams/find_entries/timestamp <uuid> 0.029932260513305664
2022-10-24 05:53:10,077:DEBUG:139787809838848:START POST /datastreams/find_entries/timestamp
2022-10-24 05:53:10,249:DEBUG:139787809838848:END POST /datastreams/find_entries/timestamp <uuid> 0.17243027687072754

This time the load was fairly fast

2022-10-24 05:54:57,616:DEBUG:139999318673152:START POST /datastreams/find_entries/timestamp
2022-10-24 05:54:57,785:DEBUG:139999318673152:END POST /datastreams/find_entries/timestamp <uuid> 0.16900038719177246
2022-10-24 05:55:01,192:DEBUG:139999705995008:START POST /datastreams/find_entries/timestamp
2022-10-24 05:55:01,363:DEBUG:139999705995008:END POST /datastreams/find_entries/timestamp <uuid> 0.1708354949951172
2022-10-24 05:55:08,786:DEBUG:139999329163008:START POST /datastreams/find_entries/timestamp
2022-10-24 05:55:08,957:DEBUG:139999329163008:END POST /datastreams/find_entries/timestamp <uuid> 0.17046308517456055

Clicking on the detail screen seems to unblock the bottleneck sooner?

@shankari
Copy link
Contributor Author

shankari commented Oct 25, 2022

Current situation:

  • ng-if with fillTrajectoriesForTripAsync commented out: maps never loaded, no hang in logs, no issues with scrolling
  • ng-if with fillTrajectoriesForTripAsync included: maps loaded, no hang in logs, no scrolling until all maps loaded (entire load took ~ 1 minute)

Hacking this by truncating only the most recent few entries ensures that all the entries are loaded pretty quickly and that we can scroll.

However, this is bad because then we will essentially load some trips twice. And what will happen if/when the user actually clicks on the button on the top to pull more data, or goes to "All Trips".

We then need to keep track of where we are in the scroll, and remove or add directives as we scroll. But isn't that what collection-repeat does? Maybe we should just change the UI to work with collection-repeat instead?

@shankari
Copy link
Contributor Author

ng-repeat is known to be a big performance issue on angular, and the workaround is to use collection-repeat
The Ma Mobilitie codebase uses collection-repeat, so there is really no reason why the new UI should not work with it.

@shankari
Copy link
Contributor Author

Using collection-repeat means that we cannot assume that the trip exists, and we need to ensure that we check before using

@shankari
Copy link
Contributor Author

shankari commented Oct 25, 2022

Fixing the one location where we need to change that, we can now display the items correctly and we correctly scroll to the bottom, BUT scrolling is still a bit janky and we cannot scroll until all the trajectories are loaded.

Removing the fillTrajectoriesForTripAsync, we can scroll immediately, and it is even pretty smooth at least initially
This makes me think that we might have fallen into one of the gotchas from the bottleneck documentation and are not reading values properly or something

@shankari
Copy link
Contributor Author

Commented out $scope.apply from the callback for the trajectory read, UI still hung until all trajectories are read.
Maybe having the limiter be a $scope variable is a problem?

@shankari
Copy link
Contributor Author

Nope, changed from $scope -> const. Still cannot scroll until all data is loaded.
at this point:

  • we have the leaflet commented out using ng-if trip.data is available
  • we have read the trajectory information and ignore it
  • still hangs until all trajectories are loaded

but if I comment out the call completely, then there are no hangs.

Is this some weird directive thing where the directives are not loaded until all their data is in place? If so, what data are they looking for?

@shankari
Copy link
Contributor Author

Ok, so this hang is either due to:

  • bottleneck, or
  • the directive

Let's try removing each of them and see what happens.

@shankari
Copy link
Contributor Author

Removed bottleneck, and "reading data" is a bit slow since we launch all the tasks before we are done. But all the results come back super early, so it is not clear if we are hung

[Log] DEBUG:Turning on the ionic loading overlay in setupInfScroll (index.html, line 154)
[Log] getting pipeline range timestamps (index.html, line 154)
...
[Log] calling readDataFromServer with {"fromBottom":53,"reachedEnd":false,"pipelineRange":{"end_ts":1666307672.171839,"start_ts":1654797228.3411021},"currentEnd":1666307672.171839} (index.html, line 154)
[Log] DEBUG:Turning on the ionic loading overlay in setupInfScroll (index.html, line 154)
...
[Log] DEBUG:Received batch of size 39 (index.html, line 154)
[Log] DEBUG:Found too many entries, truncated to 39 (index.html, line 154)
...
[Log] DEBUG:About to pull location data for range Thu Oct 20 2022 15:51:18 GMT-0700 -> Thu Oct 20 2022 16:14:32 GMT-0700 (index.html, line 154)
[Log] getRawEntries: about to get pushGetJSON for the timestamp (index.html, line 154)
[Log] About to return message {"key_list":["analysis/recreated_location"],"start_time":1666306278.3913083,"end_time":1666307672.171839,"key_time":"data.ts","max_entries":100,"trunc_method":"sample"} (index.html, line 154)
...
[Log] DEBUG:After adding batch of size 39 cumulative size = 39 (index.html, line 154)
[Log] DEBUG:new end time = 1665705805.000558 (index.html, line 154)
[Log] recomputing display trips now (index.html, line 154)
...
[Log] DEBUG:Retrieved 52 points at Tue Oct 25 2022 07:53:29 GMT-0700 (PDT) (index.html, line 154)
[Log] retrieved geojson [object Object] (index.html, line 154)
....

Let's add some timeouts to slow this down.

@shankari
Copy link
Contributor Author

shankari commented Oct 25, 2022

Ok, with adding timeouts, the UI hangs until all the calls are scheduled. Even the popovers are not scheduled. This seems to indicate that the problem with the scheduler, which apparently takes a while to return...?

[Log] DEBUG:After adding batch of size 39 cumulative size = 39 (index.html, line 154)
[Log] DEBUG:new end time = 1665705805.000558 (index.html, line 154)
[Log] recomputing display trips now (index.html, line 154)
[Log] true (index.html, line 154, x39)
[Log] DEBUG:Broadcasting infinite scroll complete (index.html, line 154)
[Log] DEBUG:infiniteScrollComplete broadcast (index.html, line 154)
[Log] Trip Item Controller called (index.html, line 154)
[Log] Trip in Trip Item Ctrl is  – undefined (index.html, line 154)
[Log] Trip's Date is  – "unknown" (index.html, line 154)
[Error] Unhandled Promise Rejection: While logging, error -[NSNull UTF8String]: unrecognized selector sent to instance 0x7fff8a6d5fa0
	(anonymous function)
	rejectPromise
	rejectPromiseWithFirstResolvingFunctionCallCheck
	callbackFromNative (cordova.js:297)
	(anonymous function) (ios-wkwebview-exec.js:129)
	promiseReactionJob
[Log] DEBUG:About to pull location data for range Thu Oct 20 2022 15:51:18 GMT-0700 -> Thu Oct 20 2022 16:14:32 GMT-0700 (index.html, line 154)
[Log] getRawEntries: about to get pushGetJSON for the timestamp (index.html, line 154)
...
[Log] getRawEntries: about to get pushGetJSON for the timestamp (index.html, line 154)
[Log] About to return message {"key_list":["analysis/recreated_location"],"start_time":1665705143.3143792,"end_time":1665705806.000558,"key_time":"data.ts","max_entries":100,"trunc_method":"sample"} (index.html, line 154)
[Error] Unhandled Promise Rejection: While logging, error -[NSNull UTF8String]: unrecognized selector sent to instance 0x7fff8a6d5fa0
	(anonymous function)
	rejectPromise
	rejectPromiseWithFirstResolvingFunctionCallCheck
	callbackFromNative (cordova.js:297)
	(anonymous function) (ios-wkwebview-exec.js:129)
	promiseReactionJob
[Log] Created multilabel directive controller, waiting for init (index.html, line 154, x6)
[Log] DEBUG:UI_CONFIG: about to call configReady function in MultiLabelCtrl (index.html, line 154)
[Log] DEBUG:UI_CONFIG in configReady function, resolving immediately (index.html, line 154)
...
[Log] During initialization, trip is  – {end_loc: {type: "Point", coordinates: [-122.08532730526939, 37.38950960523626]}, source: "DwellSegmentationDistFilter", start_loc: {type: "Point", coordinates: [-122.08652898438098, 37.39099341901742]}, …} (index.html, line 154)
{end_loc: {type: "Point", coordinates: [-122.08532730526939, 37.38950960523626]}, source: "DwellSegmentationDistFilter", start_loc: {type: "Point", coordinates: [-122.08652898438098, 37.39099341901742]}, user_input: {}, duration: 662.6861786842346, …}Object
[Log] Invoked multilabel directive controller for labels MODE,PURPOSE (index.html, line 154)
[Log] After initializing popovers – {} (index.html, line 154)
[Log] Finished initializing directive, popovers =  – {} (index.html, line 154)

@shankari
Copy link
Contributor Author

shankari commented Oct 25, 2022

Replacing the timeout with the mapLimiter, we get:

[Log] About to return message {"key_list":["analysis/confirmed_trip"],"start_time":1665702872.171839,"end_time":1666307672.171839,"key_time":"data.end_ts"} 
[Log] 08:52:24 GMT-0700 (PDT) Received batch of size 39 


[Log] 08:52:24 GMT-0700 (PDT) After adding batch of size 39 cumulative size = 39 
[Log] 08:52:24 GMT-0700 (PDT) new end time = 1665705805.000558 
[Log] recomputing display trips now 
[Log] 08:52:24 GMT-0700 (PDT) Broadcasting infinite scroll complete 
[Log] 08:52:24 GMT-0700 (PDT) infiniteScrollComplete broadcast 


[Log] Trip Item Controller called 
[Log] Trip in Trip Item Ctrl is  – undefined 
[Log] Trip's Date is  – "unknown" 


[Log] 08:52:24 GMT-0700 (PDT) About to pull location data for range Thu Oct 20 2022 15:51:18 GMT-0700 -> Thu Oct 20 2022 16:14:32 GMT-0700 
[Log] 08:52:26 GMT-0700 (PDT) About to pull location data for range Mon Oct 17 2022 16:37:02 GMT-0700 -> Mon Oct 17 2022 16:54:56 GMT-0700 

[Log] 08:52:26 GMT-0700 (PDT) UI_CONFIG: about to call configReady function in MultiLabelCtrl 
[Log] 08:52:26 GMT-0700 (PDT) UI_CONFIG in configReady function, resolving immediately 

[Log] During initialization, trip is  – {} {}Object
[Log] Invoked multilabel directive controller for labels MODE,PURPOSE 
[Log] After initializing popovers – {} 
[Log] Finished initializing directive, popovers =  – {} 


[Log] 08:52:26 GMT-0700 (PDT) About to pull location data for range Mon Oct 17 2022 15:43:41 GMT-0700 -> Mon Oct 17 2022 15:55:36 GMT-0700 
[Log] 08:52:28 GMT-0700 (PDT) About to pull location data for range Thu Oct 13 2022 16:52:23 GMT-0700 -> Thu Oct 13 2022 17:03:26 GMT-0700 

[Log] 08:52:35 GMT-0700 (PDT) Retrieved 52 points at Tue Oct 25 2022 08:52:35 GMT-0700 (PDT) 
[Log] 08:53:40 GMT-0700 (PDT) Retrieved 24 points at Tue Oct 25 2022 08:53:40 GMT-0700 (PDT) 


[Log] 08:53:58 GMT-0700 (PDT) UI_CONFIG: about to call configReady function in MultiLabelCtrl 
[Log] Invoked multilabel directive controller for labels MODE,PURPOSE 
[Log] After initializing popovers – {} 
[Log] Finished initializing directive, popovers =  – {} 

[Log] 08:54:04 GMT-0700 (PDT) in openPopover, setting draftInput = {"start_ts":1666306278.3913083,"end_ts":1666307672.171839} 

I also tried this again, and tried to type out javascript on the command line (e.g. new Date() to mark locations in which specific activities happened in the UI. These did not execute. It looks like the interpreter is completely consumed with launching location reads.

Why did this not happen for the place reads?

@shankari
Copy link
Contributor Author

Confirmed that this does not happen for the place reads. They are scheduled after the list is displayed.

[Log] 09:18:41 GMT-0700 (PDT) After adding batch of size 39 cumulative size = 39 
[Log] 09:18:41 GMT-0700 (PDT) new end time = 1665705805.000558 
[Log] 09:18:41 GMT-0700 (PDT) Broadcasting infinite scroll complete 
[Log] 09:18:41 GMT-0700 (PDT) infiniteScrollComplete broadcast 


[Log] Trip Item Controller called 
[Log] Trip in Trip Item Ctrl is  – undefined 
[Log] Trip's Date is  – "unknown" 


[Log] 09:18:41 GMT-0700 (PDT) Getting display name for  – {location: {type: "Point", coordinates: [-122.10246098601766, 37.38498206655968]}} 
[Log] 09:18:42 GMT-0700 (PDT) UI_CONFIG: about to call configReady function in MultiLabelCtrl 
... several more of these ...
[Log] After initializing popovers – {} 

[Log] 09:18:42 GMT-0700 (PDT) Getting display name for  – {location: {type: "Point", coordinates: [-122.10941049172696, 37.3857609303768]}} 

why are all trajectory reads launched before and the place ones are not? I bet this is because of the way we handle the callback in the two cases, which had been my suspicion all along.

@shankari
Copy link
Contributor Author

Changing that does change the invocation order, and we see the trip with the mode and purpose fairly soon. BUT the UI is still hung until the calls are complete. At this point, it seems to be a contention issue between the reads and the UI display.

Screen.Recording.2022-10-25.at.10.25.04.AM.mov

@shankari
Copy link
Contributor Author

shankari commented Oct 25, 2022

Yup! Javascript is single threaded, so the callbacks from multiple threads running in parallel slow down the user interface.
One solution is to use web workers to get true multi-threading, the other option is to ditch the separate trajectory read and add a new function to the server to read the trip geojson (with a truncated trajectory) directly

The advantage with (1) is that it will help us with performance issues in general
The advantage with (2) is that it will help us with showing the unified item directly, but may reintroduce performance problems while reading the trip + trajectory

(1) seems like a more principled solution overall, especially if we want to pre-read and cache values while the user is labeling the current set. Let's try it. We may try (2) anyway when we change the trips to show the sections as well.

Note also that (1) is likely to address current performance issues with jankiness due to reading from nominatim as well.

@shankari
Copy link
Contributor Author

Note that part of this might also just be that the values return super fast when we are connected to localhost. However, it seems like it would be good to not cause phone slowness when the server is actually fast. What's the point of optimizing the server then?!

@shankari
Copy link
Contributor Author

I can successfully launch a worker in a non-angular module. I cannot launch it in an angular module.

angular.module('emission.main.diary.services', ['emission.plugin.logger',
    'emission.services', 'emission.main.common.services',
    'emission.incident.posttrip.manual'])

Let's stick with the separate file for now and figure out how to integrate with angular1 later.

@shankari
Copy link
Contributor Author

shankari commented Oct 26, 2022

ok, so it looks like the window variable is not accessible from the worker. I have the following code

onmessage = function(e) {
  console.log('WORKER: Message ',e.data,'received from main script');
  const [trip_start_ts, trip_end_ts] = e.data;
  console.log("WORKER: About to pull location data for range "
    + trip_start_ts + " -> " + trip_end_ts);
  console.log("WORKER: Accessing cordova plugins ",window.cordova);

  const dummyPromise = new Promise(function(resolve, reject) {
    const dummyResponse = [];
    $timeout(() => {
        console.log("WORKER: Resolving with dummy response");
        resolve(dummyResponse);
    }, 1000);
  });
  const fillPromises = [ dummyPromise ];
  Promise.all(fillPromises).then(function([locationList]) {
    console.log("WORKER: Retrieved "+locationList.phone_data.length+" points at "+(new Date()));
    postMessage(["SUCCESS", trip_start_ts, trip_end_ts, locationList.phone_data]);
  }).catch((err) => {
    postMessage(["ERROR", trip_start_ts, trip_end_ts, err]);
  });
}

And I get the error

[Log] WORKER: Message  (2) (infinite_scroll_async.js, line 2)
[1666306278.3913083, 1666307672.171839] (2)
"received from main script"
[Log] WORKER: About to pull location data for range 1666306278.3913083 -> 1666307672.171839 (infinite_scroll_async.js, line 4)
[Error] ReferenceError: Can't find variable: window (infinite_scroll_async.js, line 6)

Given that, it is not clear how we can access the cordova plugins. Let's try to pass in the plugins

@shankari
Copy link
Contributor Author

mapWorker.postMessage([trip.start_ts, trip.end_ts, window.cordova.plugins]); fails with

[Error] Unhandled Promise Rejection: DataCloneError: The object can not be cloned.
	promiseEmptyOnRejected (infinite_scroll_list.js:360)
	promiseReactionJob

@shankari
Copy link
Contributor Author

shankari commented Oct 26, 2022

ah we cannot call cordova APIs from a webworker and this is currently marked as wont-fix
apache/cordova#93
apache/cordova-docs#1059

We could switch to standard XMLHTTPRequest calls, but then we will run into CORS issues with cordova WKWebView.
Which is why we switched even the aggregate calls to use the cordova-plugin-advanced-http plugin
e-mission/e-mission-phone@06177b9

I am not sure we want to go backwards on that, and I am also not sure that we can support CORS easily on the NREL environment.

Given this, I think we should probably go to option (2) from #819 (comment)

We can use web workers for the address reads and (2) for the trajectory reads.

@shankari
Copy link
Contributor Author

Since we are working on web workers right now, let's finish the address reads. We could even temporarily address
#821
by passing in the destination that was read and relying on trip matching to fill in the addresses as a stopgap.

@shankari
Copy link
Contributor Author

Actually, I am not sure that it helps to use web workers for the address reads either. Note that the actual call to the server is already async. So presumably the slowness, if any, is coming from processing the entries on the phone, and that happens automatically in $scope.$apply, which we cannot easily put into a web worker because it is unclear how we can use angular functions.

Let's first see how bad the current situation is, and then decide how to proceed.

@shankari
Copy link
Contributor Author

shankari commented Oct 28, 2022

the current situation is that the previous issue with the delayed reads is addressed
#819 (comment)

The queries seem to come it at a consistent cadence. However, at least on the emulator, the UI is not responsive until all the trajectory information is handled. If this is indeed due to the $scope.$apply, I wonder if it helps to batch up the calls to $scope.apply.

Let's:

  • try the current code on an actual phone,
  • try the batch code,
  • and if not, fall back to the more complex solution.

@shankari
Copy link
Contributor Author

Installed the current code on an actual phone; seems to work just fine.
Loaded 40 trips with no hanging on an iPhone7
Not even on "All Trips"

Let's try pushing it out and see if we are done.

@shankari
Copy link
Contributor Author

On the emulator, the devapp had been getting slower and slower, to the point that it couldn't even start up.
I noticed that while it was hanging, we were getting simulated locations continuously, and wondered if that was cluttering up the app.

So I uninstalled and reinstalled, and everything is super-fast now even in the emulator. All 40 trips are loaded without any problems with performance or hanging.

@shankari
Copy link
Contributor Author

shankari commented Dec 7, 2022

Merged and pushed to production

@shankari shankari closed this as completed Dec 7, 2022
Repository owner moved this from Current two week sprint to Sprint tasks completed in OpenPATH Tasks Overview Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant