mobile app performance, 9 july · -use free apps like speedtest to monitor network conditions, as...

41
#mstrworld Mobile App Performance, 9 July Tips & Tricks to Building Lightning-fast Apps Bram Kloth Manager Mobile Solutions Europe

Upload: others

Post on 21-May-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

#mstrworld

Mobile App Performance, 9 July

Tips & Tricks to Building

Lightning-fast Apps

Bram Kloth

Manager Mobile Solutions Europe

Page 2: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

Performance?

Mobile

Page 3: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld 3

Devices

Network

Mobile Server

Intelligence Server

Database

MSTR stack (Mobile)

Reactive

Performance Tuning

Proactive

Incorporate Performance

tuning in design and

development

Page 4: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

CA

CH

E M

AN

AG

ER

Ide

ntifies F

aste

st W

ay to

Fu

lfill

Qu

erie

s

DB Connection

Cache

Element

Cache

Results

Cache

Object

Cache

Document

Cache

RDBMS

Accelerates attribute element requests for prompting..

Accelerates queries including dashboard datasets by

storing report results in-memory

Accelerates dashboard performance by storing the final

formatted output on server – Flash, HTML, PDF, Excel

Accelerates metadata object requests for rapid

assembly into queries for reports.

Accelerates connections to the database to ensure

fast query submissions

Device

Cache

Accelerates dashboard performance by storing the final

output in device memory

Caches

5

Page 5: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

17

6,1

4,9

4 4,7

4,1

3,2 3,0

0

2

4

6

8

10

12

14

16

18

Resp

on

se

Tim

e (

s)

Sample Customer Dashboards

No Server Cache

Server Cache

Caches: sample benchmarks server caches

Page 6: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

6,0

5,1

4,2 4,4

3,5

2,4 2,3 2,4

0

2

4

6

8

Response T

ime (

s)

Sample Customer Dashboards

Server Cache

Device Cache

Device Caches: sample benchmarks client caches

Page 7: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld 8

Methods of Caching on Device

• Live Execution

• Subscription

• Precaching

• Background Execution

Page 8: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld 9

Devices

Network

Mobile Server

Intelligence Server

Database

Device Caches: live execution

GUI

Page 9: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

Device Caches

Anything that can go wrong, will go wrong

• Clear on Close is set to ON at Mobile Configuration/Device Level

• Caching is not set up correctly

- Project Level Cache settings are turned OFF

- Document Level Cache settings are turned OFF

- Component Dataset Level Cache settings are turned OFF

• Correct type of Cache not turned ON at server level

• Adequate memory is not allocated to save caches

- Server side memory allocation

- Client Side memory allocation

• Documents where some component are not cached

• Cache Expiration settings are too low

• Data is being refreshed too frequently

• Caches become Dirty/Unusable for some reason or are not hit correctly

Page 10: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

Device Caches

Subscriptions

12

• Advantages include

- Can be set up on a schedule, downloaded on App startup

- Can be used for offline scenarios, once downloaded

- Can be managed on a per user basis

- Default prompt answers can be provided

• Things to be careful about

- Subscriptions should be ready in History List inbox for optimal effect

- Number and size of downloads

- Good network availability during initial download

- Data change/refresh scenarios

Page 11: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

Device Caches

Pre Caching

13

Advantages include

- Can be preloaded at startup

- Can adapt intelligently to user behavior while downloading

- Cache Update subscription be used to keep the server caches current

- Can be used for offline scenarios, once downloaded

- Pre-loading bar shows progress of downloads (same as subscriptions)

Things to be careful about

- There have to be valid server caches for optimal use, else live execution happens

- Number and size of downloads

- Good network availability during initial download

- External links, Images on secure servers etc (same as subscriptions)

Page 12: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld 1

4

Parent Dashboard

Linked Dashboard 1

Linked Dashboard 2

Linked Dashboard 3

Linked Dashboard 4

Supporting Objects

Folder

Adaptive Precaching: workflow

Page 13: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld 1

5

Parent Dashboard

Linked Dashboard 1

Linked Dashboard 2

Linked Dashboard 3

Linked Dashboard 4

Adaptive Precaching: workflow

Page 14: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

Device Caches

Advantages include

- Content can be downloaded even when App is in background (using new iOS7 API)

- Can be used for offline scenarios, once downloaded

- Single MicroStrategy App (no need for 2 separate Apps)

Things to be careful about

- Device needs to be on wifi for downloads to happen

- App needs to be running in background

- Good Battery power

- “Treat project as confidential” needs to be disabled

- “Never persist credentials” needs to be disabled.

APNS

Background

Execution

I-Server: 9.4.1 HF4

Mobile-Server: 9.4.1 HF4

Mobile-Client: 9.4.1 U3

Page 15: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld 17

Devices

Network

Mobile Server

Intelligence Server

Database

Devices

Page 16: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

Hardware Considerations

Size does matter!

Using the latest greatest device is always preferred.

Advantages may include

• Better internal hardware architecture

• Better Processor/CPU

• More RAM

• Bettor Network hardware

• Better Graphics Engine/GPU

• Specific Feature improvements: Camera, GPS, Video streaming etc

• Better OS

• New features and functions supported by MSTR

Devices

Page 17: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

Hardware Considerations (light rendering)

1,6

2,2

2,6 2,7

3

3,3

3,9

1,3

1,7

2,2

2 2

2,3

2,8

0

1

2

3

4R

esp

on

se T

ime

(s)

Sample Internal Dashboards (Light Rendering Cases)

iPad 4

iPad Air

Page 18: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

Hardware Considerations (heavy rendering)

12,5

16,6

18,1 18,2

25,6

7

9,4

10,4 10,9

14,5

0

5

10

15

20

25

Res

po

nse

Tim

e (s

)

Sample Internal Dashboards (Heavy Rendering Cases)

iPad 4

iPad Air

Page 19: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

Software Considerations

Always use the latest and greatest MSTR Release !

• Better Performance and Reliability than earlier versions

- Incremental Downloading (9.2.1)

- Binary Compression (9.3)

- Combining HTTP requests (9.3)

- Definition Caching (9.3)

- New RWD Engine workflow (9.4)

- Binary limits normally increase every few builds

• Newer features and/or modified workflows for older ones, that might improve

performance

• Many other fixes which may impact Performance/Reliability directly or indirectly

• Device OS versions matter too

Page 20: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

MSTR 9.4 vs. 9.3

Page 21: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld 23

Devices

Network

Mobile Server

Intelligence Server

Database

Network

Page 22: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

Network Considerations

Performance variation by network

2,2 2,7 2,3

5,6

3,1

6,2 6,5

21,6

3,8

6,6 7,2

28,5

4,3

8,4 9,7

38,9

0

5

10

15

20

25

30

35

40

45

Res

pn

se T

ime

(s)

Sample Internal Dashboards

Wifi

4Mbps, 50ms

3Mbps, 50ms

2Mbps, 50ms

Page 23: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

Network Considerations

“Trouble”- Shoot the Messenger

• Various factors play a role in performance over the network including: Bandwidth,

Latency, Packet Loss, Signal Strength, Distance from Cell Towers, Actual Data being

transferred etc

• For optimal network performance

- Choose Wifi over 3G/4G

- Choose LTE over 4G over 3G etc.

- Pay attention to the MicroStrategy Network error messages

- Avoid Network completely using caching, slicing selectors, offline usage etc

- Use free Apps like SpeedTest to monitor Network conditions, as necessary

- Try HTTP Compression if you are using MSTR versions without compressed binaries

- Use Best Practices in global deployment scenarios

• Other considerations

- VPN services may add significant overhead, sometimes up to 40-50% or worse

- Consider Performance vs. Security tradeoff for services like Good Dynamics integration

- Firewalls and other layers of security could add overheads too

Page 24: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

Page 25: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld 27

Devices

Network

Mobile Server

Intelligence Server

Database

Server Side performance optimization

Page 26: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

CA

CH

E M

AN

AG

ER

Ide

ntifies F

aste

st W

ay to

Fu

lfill

Qu

erie

s

DB Connection

Cache

Element

Cache

Results

Cache

Object

Cache

Document

Cache

RDBMS

Accelerates attribute element requests for prompting..

Accelerates queries including dashboard datasets by

storing report results in-memory

Accelerates dashboard performance by storing the final

formatted output on server – Flash, HTML, PDF, Excel

Accelerates metadata object requests for rapid

assembly into queries for reports.

Accelerates connections to the database to ensure

fast query submissions

Device

Cache

Accelerates dashboard performance by storing the final

output in device memory

Caches: enable caching wherever you can

28

Page 27: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld 29

Devices

Network

Mobile Server

Intelligence Server

Database

Full stack

Page 28: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

Data Considerations

You cannot beat physics!

• Mobile dashboards should be optimized for mobile consumption

• Make sure to download only as much data as needed - Especially for Landing Pages

• Split larger dashboards into smaller ones and link drill to them in real time

• Linked Dashboards can be subscribed/pre cached to optimize further

• Split dashboard into multiple layouts to benefit from incremental downloading

• Consider the Network being used by end user while designing the dashboards

• Consider network bottlenecks at Server/Wifi/Cellular level when batch downloading

Page 29: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

Design Considerations

Good Design and Workflow make all the difference

• GUI/Visual Elements

• Selectors

- Slicing vs. Filter Selectors

- Prompts vs. Selectors

• Images

- Image resolution and size

- Image properties like layers, gradients, transparency etc

- Image format

- Screen size and resolution of device being used

- Number and location of images

- Image Caching considerations

- Pre-baked images

Page 30: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

Product Sales

Product A 1M

Product B 1.3M ….

All slices loaded on client

Selector changes local & faster

More data adds to downloading time

Offline analysis possible

Product Sales

Product A 1M

Product B 1.3M ….

1 Million Rows 1 row

Slicing Selectors Filter Selectors

Initial Rendering 0.5s

Initial Rendering 0.5s

Data Warehouse

Thousands of rows

Data Warehouse

Thousands of rows

Only required slice is loaded

Selector changes require trip to the server

Single slice is fetched regardless

Offline analysis not possible

Total Loading

Time 3.5s

Total Loading Time

0.5s

Slicing vs Filtering

Page 31: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

Performance tools

You cannot improve what you do not measure

Various performance measuring tools available within MSTR

• Enterprise Manager

• Diagnostics Logs

• Web Statistics etc

• Specially for Mobile: Mobile Device Logs

Other tools in market

• Fiddler, WireShark, SpeedTest etc for Networks

• Xcode Instruments, DDMS etc for Devices

Page 32: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

Performance Tools

Enterprise Manager

You can now use Enterprise Manager to keep record of Mobile performance too

Enterprise Manager can be used to track Mobile Statistics including

• Execution Time

• Rendering Time

• App Version

• OS Version

• Cache Usage

• Network etc

Manipulation Tracking in the works

We hope to provide Enterprise Manager Dashboards for easier use

Page 33: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

Page 34: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

Network Considerations

Carrier Performance: The proof is in the pudding*

0

200

400

600

800

1000

1200

1400

1600

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

La

ten

cy (

ms)

Average Speed (Mbps)

*Data for major US Carriers (PC Magazine Report 2012)

Page 35: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

Other Factors to be considered

Analyze and Optimize the end-to-end workflow

Once you know device or network are not bottlenecks, you can look elsewhere

• Server hardware may need optimization, especially for concurrency scenarios

• Databases may need to be optimized

• Cubes may need to be optimized

• SQL queries may need to be optimized

• Third party services like Google Maps, YouTube etc may play a role

• Wherever possible, use cubes over warehouse; Caches over cubes

• Dashboards running against Cubes also typically give better performance than those

running against View Reports

… refer appropriate sessions for tips on these and much more

Page 36: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

QUESTIONS?

Page 37: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

THANK YOU!

Page 38: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

Intelligent Server Settings

Page 39: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

Mobile Server Settings

Page 40: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

Device Caches

Background App Refresh

Page 41: Mobile App Performance, 9 July · -Use free Apps like SpeedTest to monitor Network conditions, as necessary -Try HTTP Compression if you are using MSTR versions without compressed

#mstrworld

Device Side Settings