1
Optimizations PERFORMANCE EVALUATION OF TRANSIT DATA FORMATS ON A MOBILE DEVICE Sample Responses Conclusions Opportunities Mobile 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 Acknowledgements This research was funded by the National Center for Transit Research at the University of South Florida. locationaware.usf.edu github.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</DatedVehicleJ ourneyRef> </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 Elapsed Tim e (m s) XM Lvs. JSON ParsingTim e -All Requests JSON XM L 0 2000 4000 6000 8000 10000 12000 14000 16000 18000 20000 Min. M ax. Avg. 50th percentile 68th percentile 95th percentile Std dev. Elapsed Tim e (m s) XM Lvs. JSON ParsingTim e -Sum m ary JSON XM L 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 M in. M ax. Avg. 50th percentile 68th percentile 95th percentile Std dev. Elapsed Tim e (m s) JSON -Cold vs. Pseudo-W arm Starts-Sum mary (n = 30) Cold Starts Pseudo-W arm Starts 0 5000 10000 15000 20000 25000 M in. M ax. Avg. 50th percentile 68th percentile 95th percentile Std dev. Elapsed Tim e (m s) XM L-Cold vs. Pseudo-W arm Starts-Sum m ary (n = 30) Cold Starts Pseudo-W arm 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 M in. M ax. Avg. 50th percentile 68th percentile 95th percentile Std dev. Elapsed Tim e (m s) JSO N -Cold vs. Pseudo-W arm Startsw ithoutcache read tim e (n = 30) Cold Starts Pseudo-W arm Starts Scan for full paper FasterXML, LLC

TRB 2014 - Performance Evaluation of Transit Data Formats on a Mobile Device

Embed Size (px)

DESCRIPTION

Presented at Transportation Research Board 2014 - Over the last decade mobile devices have changed how we access transportation information. However, many past data formats used in information services have been designed without the processing and energy constraints of mobile devices in mind. Newer standards, such as the Service Interface for Real-time Information (SIRI) v2.0, are including mobile-friendly features that reduce the processing overhead on mobile devices. Coupled with the advances in mobile device processing capabilities, many believe that performance is no longer an issue of concern in modern mobile phones. This paper presents an evaluation of the SIRI data format on a mobile device, which indicates that not only is performance still an issue, but that app developers should carefully consider certain software design choices to avoid exposing mobile users to extensive wait times (e.g., wait for real-time transit arrival information). The results also demonstrate that information service providers should always offer mobile-friendly interfaces (i.e., RESTful web services with JSON encoding) when possible. The benchmarking software is made available as an open-source application so that others can perform their own experiments, and so that app developers can use this library as a foundation for building new applications based on the SIRI format. Read the full paper here - http://bit.ly/Perf_Eval_Data_Mobile_Devices

Citation preview

Page 1: TRB 2014 - Performance Evaluation of Transit Data Formats on a Mobile Device

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