cancel
Showing results for 
Search instead for 
Did you mean: 

Performance Issues

Former Member
0 Kudos

hii everybody,

I wanted to know that if we r making one mi application what can be the various performance factors that are associated with the application.response time , redundancy etc. and what can be done to increase the performance.(ie reducing response time etc..)

thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Devendrakumar

Please go thru the MDK performance tips for a clear understanding on Mi application performance tuning.

http://media.sdn.sap.com/public/html/submitted%5Fdocs/MI/MDK%5F2.5/content/appdev/performance/perfor...

Thanks

Gopi

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Deven.

Don't know if it will help a lot, but, specifically for PDA scenarios, loading the images in the JSP's take a noticeable amount of time. In the order of 1-1.5 second per image. This is in large part due to the processing of the HTTP request, and encoding/decoding of the image data. In a MAM page (for example), where you have the banner logo, buttons, and others, there may be 4 or 5 images. This translates into maybe 3-7 seconds just loading images.

One way to speed this up is to change the JSP application pages so that they load the images using file:// URL's instead of HTTP. To continue with the MAM example, you can create a "helper" bean object that accomplishes that purpose, and change the img tags so that they get the URL prefix from this object instead.

Hope this helps,

-Carlos

Former Member
0 Kudos

Hi Deven.

You also can speed up your application by ensuring that the jar file is not that big. This mainly effects the loading time of you app.

It is also a good idea to make sure that all SymcBo related files aren't packaged into the jar file but left as plain class files in the WEB-INF\classes folder.

If you are using MAM or MAU take a look in the shipped standard war file. MAU and MAM related stuff are packaged into single different jar files. The SnycBo class filles are not packaged.

If you generate the war via NWDS for example after extending MAU you only have the option either to package all classes into one jar or to left all classed unjared. So you have to adopt the file afterwards or set up you one deployment process via ant.

To point 7. of Jo's post I have to say that this is a realy good point. We are loading most frequent used data during start up of the application. This slows down the start time of the app but the user accepts this because the app itself runs way more faster.

Cheers,

Sascha

Former Member
0 Kudos

Hi Devendra,

as already pointed out by others often there is a lot of performance potential by improving your UI. If you have screen response times of 6-7 seconds than you should first find out which layer consumes most time. For example rewrite one of your JSP temporarily so that it does not fetch the data from the Smart Sync layer but use dummy data instead. If you still have those long response times you know that improving access to Smart Sync read/write api is not worth to investigate.

But if the response time comes significantly down using the dummy data you can improve your access of the Smart Sync layer.

Regarding the deprecated APIs you mentioned above: Using deprecated Smart Sync APIs in the SyncBoInDelta... or SyncBoOutDelta... area affects mostly the synchronization time and not directly the response times in your application. But of course there is an indirect affect: Using those deprecated API increases the memory consumption of the synchronization. The more memory you need the more often JVM's garbage collector is running which is very expensive on PDAs. And those garbage collection runs can happen while navigate in your application. So if possible avoid using those deprecated APIs. These are my suggestions regarding the undocumented alternatives:

1) SyncBoOutDeltaObserver

-> There is no direct alternative. There are only rare cases where it really makes sense to observe the outgoing data. The problem of this API is that it forces the MI client to created a lot of object while sync outbound processing (SyncBoOutDelta, RowChange...) and hinders the Smart Sync implementation to use some internal performance optimization.

2) SyncBoOutDelta

see 1.)

3) SyncBoInDelta

Also here the Smart Sync is forced to create a lot of Calllback classes while the sync inbound processing. Only in rare cases there is a really need to observe all incoming data. Normally you only need callbacks for errors and conflicts to display a information to the user. For this you can either use SyncReplyObserver or the ErrorConflictInbox (for this you need to configure your MCD accordingly).

4) Row.createUnlinkedCopy()

Instead of reading a Row, create an unlinked copy, change the fields (Row#setFieldValue) of the copy and then replace the original with the copy (SyncBo#replaceRow) you can use Row#modifyFieldValue(...) on the original Row and at the end SyncBo#modifyRow(...) to persist the changes.

Hope this helps.

Regards,

Tobias

Former Member
0 Kudos

Hi Devendrakumar ,

the most important thing is IMO the UI: Use AWT instead of JSP. If this is not possible, then try to keep the html that you create as simple as possible: No nested tables and no images. The bottleneck here is the Pocket IE; it renders the html extremely slow.

Other then the UI:

- Use DB2e instead of File I/O, which is a lot faster if the amount of data grows.

- Try only to use the latest SmartSync APIs.

- If some of your database accesses require a lot of time, add performance trace points in your code (or simple measure the time that your functionality requires by subtracting the time before and after); try to find another way of accessing the data (most of the time there is more then one MI API to do the same thing).

Hope this helps!

Br, alex

---

alexander ilg

http://www.juniverse.org

Former Member
0 Kudos

hii alexander,

can u please let me know what are the variou parameter like Data storage on PDA,amount of data fetched from the backend is going to affect the performance. Is there is any performance standards specified by SAP that say for x amount of data minimum time taken is say y mins.

thanks in advance.

Devendra Phate

Former Member
0 Kudos

Hi,

I hear this question a lot. The answer: No, I can't give you any numbers.

There are so many unknown things that makes an answer impossible.

The first thing I don't know is what performance you are talking about: Application-screen refresh or synchronization?

Even if I knew the answer it depends on so many facts: Network bandwidth, Sync type (generic or smart Sync), SyncBo structure, amount of data, UI type (Awt or Jsp), complexity of the UI, displayed information, persistence type (DB2e or File I/O), .... the list goes on and on!

So sorry, I can't give you any real answer to this question without a detailed analyses of your application and business case.

Br, alex

---

alexander ilg

http://www.juniverse.org

Former Member
0 Kudos

Hi Alexander

We have made a SmartSync MI Application.Everything thing is working fine.But the scenario is this that when we try to navigate through the application from one page to another ,for example if i click on one link to get details corresponding to that link(i.e) we are retreiving the data from the local database, but this is taking a lot of time and according to our buisness need we have to reduce this time to fetch the data.

Can anyone help me regarding this issue what can be done either in coding part, what parameters & standards to follow to improve the performance.

Thanks in Advance,

Former Member
0 Kudos

Hi Alexander

We have made a SmartSync MI Application.Everything thing is working fine.But the scenario is this that when we try to navigate through the application from one page to another ,for example if i click on one link to get details corresponding to that link(i.e) we are retreiving the data from the local database, but this is taking a lot of time and according to our buisness need we have to reduce this time to fetch the data.

Can anyone help me regarding this issue what can be done either in coding part, what parameters & standards to follow to improve the performance.

Thanks in Advance,

Devendra Kumar Phate

Former Member
0 Kudos

hello deven,

here are some things that i personally consider when developing

an MI application.

1) make the syncbo as small as possible i.e. limit the

number of fields on the header row as well as its child

rows. if it's not possible to remove other fields, try

breaking it up into smaller pieces; grouping fields that

are frequently updated and those that are not.

2) avoid use of observers. as you might have noticed, most

of the observer interfaces are now deprecated. MI bypasses

the creation of object like SyncBoOutDelta that are used

in notifying the observers. if there are no observers, MI

won't be creating them. thus saving some memories and time.

3)avoid the use of tomcat i.e. jsp/servlet if possible.

you can use AWT instead and use standard widgets.

4)use generic sync for fixed data rather than defining

a download type syncbo. however, you have to create your

own sort of data manager for persistence and retrieval.

5)for browser based UI, try AJAX like implementation by

retrieving your data from data repository piece by piece

and asynchronously. for AWT based UI, this is pretty easy.

6)avoid wrapping syncbo or row objects if possible. for

example, if you have syncBos A,B,C, avoid creating wrapper

classes like BOA, BOB, BOC for each of them. it will only

adds up to memory consumption esp when your wrappers are

wrapped all over again. though convenient and manageable

in nature, such tradeoff follows.

7)data caching. sometimes caching part of your data speeds

up the processing but is likely to consume memory. cache

only those are frequently used and rarely modified data.

something like MFU functionality or MRU...

i hope i didn't miss something. i will just add it up once

something important comes to my mind.

regards

jo

Former Member
0 Kudos

Hii Jo,

we have a specific buisness scenario where we have to reduce the time taken by jsp page to upload from 6-7 seconds to 3 seconds (when we are fetching the data from the local database)and we have used some deprecated classes like

SyncBoInDeltaObserver

SyncBoOutDeltaObserver

SyncBoOutDelta

com.sap.ip.me.api.conf.PropertyKeys.SYNCSETTINGS_USER

Row.createUnlinkedCopy()

SyncBo.deleteRow(String)

Row.getFieldValue(FieldDescriptor)

SyncBo.getRow(String)

com.sap.ip.me.api.services.LogSeverities

SmartSyncJQueryFactory.createSortOrder

Untyped read

Use of values > 18 digits

Row.setFieldValue()

SyncBoDataFacade.getRows(Query) / SyncBoDataFacade.getSyncBos(Query)

StringBuffer

Use of multiple attributes and attributes links

getMultipleDetailsDetails

Query + QueryRuntime

Number of handlers

“Check the Type” flag

SmartSyncRuntime.getSyncBoDataFacade(VisibilityType)

SmartSyncRuntime.getSyncBoDeltaRequestFacade(VisibilityType)

SyncBoResponse.getSyncKey()

SyncBoDataFacade.replaceSyncBo(SyncBo)

PerformanceLog.reset()

SyncBoOutDelta.setSendType(SyncBoOutDeltaSendType)

now we are trying to replace it with the classes & method as described in java docs. but there are some classes and methods which are deprecated but what to use instead of them is not provided .I am currently working with Smart Sync application. I need to know the other option that should replace some of the depricated Smart Sync APIs.

e.g. SyncBoInDeltaObserver is depricated. Instead of this interface we should use SyncReplyObserver.

Similarly can u tell me for the following classes / interfaces / methods is there any option available?

1) SyncBoOutDeltaObserver

2) SyncBoOutDelta

3) SyncBoInDelta

4) Row.createUnlinkedCopy()

second thing,

i just want to know that is it possible to reduce the time taken by making above changes.

Thanks in advance.

devendra