Optimizations
PERFORMANCE EVALUATION OF TRANSIT DATA FORMATS ON A MOBILE DEVICE
Sample Responses
Conclusions
OpportunitiesMobile devices and apps have created new opportunities to access real-time transportation information that can save travelers time and money.
Challenges
Pseudo-Warm Start Results
AcknowledgementsThis research was funded by the National Center for Transit Research at the University of South Florida.
locationaware.usf.edugithub.com/CUTR-at-USF/SiriRestClientUI
• Mobile app performance is important for user experience (e.g., waiting for new real-time info)
• Use JSON instead of XML. Cold starts with JSON were avg. of 4 times (14s) faster than XML, with JSON warm starts avg. of 224ms faster
• Hiding initialization latency from user (via pseudo-warm starts) can significantly reduce user wait time
European Committee for Standardization (CEN) is evaluating v2.0 of the Service Interface for Real Time Information (SIRI) (CEN/TS 15531) standard, including new “mobile-friendly” features, including a Representational State Transfer (REST) interface and Javascript Object Notation (JSON) encoding for real-time transit arrival info.
Results
University of South Florida
Mobile device performance is still an issue in terms of processing power, wireless communications, and energy constraints. New data standards should recognize the importance, and limitations, of mobile devices. Slow performance has significant implications on app usability, including user wait times for refreshing real-time info.
SIRIRestClient Android app used to benchmark performance
XML cold start response is almost 18 seconds, over 4 times as long as the JSON cold start response (approx. 4 seconds)
An open-source mobile app was created to benchmark real-time information transfer and processing times between a SIRI interface (MTA Bus Time in NYC) and a mobile device (Samsung Galaxy S3 with Android 4.1.1, 1.5 GHz dual core processor, 2GB RAM and Jackson JSON/XML processor v2.1.2).
Sean J. Barbeau Tatu Saloranta
[email protected] [email protected]
Evaluation
<Siri xmlns:ns2="http://www.ifopt.org.uk/acsb" xmlns:ns4=http://datex2.eu/schema/1_0/1_0 xmlns:ns3="http://www.ifopt.org.uk/ifopt" xmlns="http://www.siri.org.uk/siri"> <ServiceDelivery> <ResponseTimestamp>2012-09-12T09:28:17.213-04:00</ResponseTimestamp> <VehicleMonitoringDelivery> <VehicleActivity> <MonitoredVehicleJourney> <LineRef>MTA NYCT_S40</LineRef> <DirectionRef>0</DirectionRef> <FramedVehicleJourneyRef> <DataFrameRef>2012-09-12</DataFrameRef> <DatedVehicleJourneyRef>MTA NYCT_20120902EE_054000_S40_0031_MISC_437</DatedVehicleJourneyRef> </FramedVehicleJourneyRef> <JourneyPatternRef>MTA NYCT_S400031</JourneyPatternRef> <PublishedLineName>S40</PublishedLineName> <OperatorRef>MTA NYCT</OperatorRef> <OriginRef>MTA NYCT_200001</OriginRef> </MonitoredVehicleJourney> </VehicleActivity> </VehicleMonitoringDelivery> <ServiceDelivery></Siri>
{Siri: { ServiceDelivery: { ResponseTimestamp: "2012-08-21T12:06:21.485-04:00", VehicleMonitoringDelivery: [ { VehicleActivity: [ { MonitoredVehicleJourney: { LineRef: "MTA NYCT_S40", DirectionRef: "0", FramedVehicleJourneyRef: { DataFrameRef: "2012-08-21", DatedVehicleJourneyRef: "MTA NYCT_20120701CC_072000_S40_0031_S4090_302" }, JourneyPatternRef: "MTA NYCT_S400031", PublishedLineName: "S40", OperatorRef: "MTA NYCT", OriginRef: "MTA NYCT_200001" } } ] } ] } }
XML (822 char)Typical test response was approx. 5KB
JSON (421 char)Typical test response was approx. 4KB
0
2000
4000
6000
8000
10000
12000
14000
16000
18000
20000
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49
Elap
sed
Tim
e (m
s)
XML vs. JSON Parsing Time - All Requests
JSON XML
0
2000
4000
6000
8000
10000
12000
14000
16000
18000
20000
Min. Max. Avg. 50th percentile
68th percentile
95th percentile
Std dev.
Elap
sed
Tim
e (m
s)
XML vs. JSON Parsing Time - Summary
JSON
XML
Improving cold starts is important, since mobile apps are often restarted. Possible optimizations were examined.
Pseudo-warm starts can improve performance via caching Jackson objects
0
1000
2000
3000
4000
5000
6000
Min. Max. Avg. 50th percentile 68th percentile 95th percentile Std dev.
Elap
sed
Tim
e (m
s)
JSON - Cold vs. Pseudo-Warm Starts - Summary(n = 30)
Cold Starts Pseudo-Warm Starts
0
1000
2000
3000
4000
5000
6000
Min. Max. Avg. 50th percentile 68th percentile 95th percentile Std dev.
Elap
sed
Tim
e (m
s)
JSON - Cold vs. Pseudo-Warm Starts - Summary(n = 30)
Cold Starts Pseudo-Warm Starts
0
5000
10000
15000
20000
25000
Min. Max. Avg. 50th percentile 68th percentile 95th percentile Std dev.
Elap
sed
Tim
e (m
s)
XML - Cold vs. Pseudo-Warm Starts - Summary(n = 30)
Cold Starts Pseudo-Warm Starts
0
5000
10000
15000
20000
25000
Min. Max. Avg. 50th percentile 68th percentile 95th percentile Std dev.
Elap
sed
Tim
e (m
s)
XML - Cold vs. Pseudo-Warm Starts - Summary(n = 30)
Cold Starts Pseudo-Warm Starts
Pseudo-warm starts significantly improve user wait times by hiding initialization time (cache read time) while the user performs other activities
Pseudo-warm starts produce a 44% performance increase when using XML (due to a large initial overhead), and a 3.96% improvement for JSON
0
1000
2000
3000
4000
5000
6000
Min. Max. Avg. 50th percentile 68th percentile 95th percentile Std dev.
Elap
sed
Tim
e (m
s)
JSON - Cold vs. Pseudo-Warm Starts without cache read time(n = 30)
Cold Starts Pseudo-Warm Starts
0
1000
2000
3000
4000
5000
6000
Min. Max. Avg. 50th percentile 68th percentile 95th percentile Std dev.
Elap
sed
Tim
e (m
s)
JSON - Cold vs. Pseudo-Warm Starts without cache read time(n = 30)
Cold Starts Pseudo-Warm Starts
Scan for full paper
FasterXML, LLC