Performance ... soft attributes hurt a lot

After writing a rather extensive application using a modified version of jsf (that works very well) I did some profiling. Boy was I surprised.
When you get into an application which contains views (trees) that are somewhat complex, such as a tabset component with some nested panesl, toolbars, buttons, and a large data grid (say 50 to 100 rows with 7 columns) where each cell may contain a command or some other custom component the performance gets a little bit ugly.
I was very surprised to uncover the primary culprit of the poorformance bottleneck. Using the Optimizeit profiler that ships with JBuilder, a beautiful tool by the way, I came to the realization that the utilization of soft attributes is a tremendously bad design decision. In fact, in the view which is described above, accessing the soft attributes actually took more time than acquiring the data for the view which required 12 calls to different databases, almost 5 seconds ... obviously the profiler adds some overhead.
I hope the use of soft attributes is just for the early access release ... and not part and parcel to the spec.
Soft attributes are okay, but only for optional attributes. The key attributes associated with each component should be hard attributes, actual instance variables of the component. I am talking about things like parent, componentId, rendererType, modelReference, value .... Particularly parent, and componentId are called thousdands of times for the sort of view I described above and that take seconds to execute when they are stored in a hashmap. I would not have believed it but, I have gone through our implementation of jsf and turned all of these soft attributes into hard attributes and hot damn, these seconds are now 20 , 30, 40 miliseconds.
This is even more pronounced if the component set used contains attributes like 'visible' or 'enabled' which require a traveral up the tree of components. In fact, for these type of attributes to really improve the performance we had to add the additional attribute 'parentVisible' that would be set on children once when a parents state was changed in order to avoid having to do the traversals over and over again.
I can understand if people are skeptical about this, I would have been as well ... we are only taking about hash lookups. But in production scale applications hash lookups are a hell of a lot more expensive than direct access to an instance variable and jsf does a lot of traversing ... during decode process ... during request event handling ... during validating ... during model updating ... during application event handling ... and then during rendering.
For simple 10 component web pages the soft attributes work fine, but to produce truly rich client html apps they simply do not scale.
The good news is with proper profiling and some tweaks to our base component class the performance now almost rocks...
JUST FYI ... we are running on Weblogic 6.1 and using a beefy solaris box.
Side Notes .....
We have created our a component set from scratch because as anyone using the ea release has obviously found the components included are simply unusable for anything serious. We started with an implementation of UIComponent - we could not use UIComponentBase because its setParent method is package scope and we wanted, no, we needed to make parent a hard attribute.
We have been able to create very complex components including grids that support sorting, filtering, paging, tab components, collapsible panels, hierarchical trees, a light XForm rendering component, buttons, toolbars, etc.... A very rich set of components.
We have not used the tag libraries for our application because they just are not ready ... instead we do most of our component rendering using Apache ECS in custom renderers. In fact we did not use JSP's to define most of our trees, instead we added the concept of TreeBuilders... no time to discuss this now.
I promised a while ago to post a coherent set of findings based on our work and still intend to do so, just trying to find the time ... sorry if this is a little bit all over the place. I felt compelled though to sound the warning about relying exclusively on soft attributes.

(Member of JSF EG here...)
Thanks for your comments and feedback; it's being discussed
right now. The issue can be attacked on a couple of fronts.
First, some of the attributes currently being stored as
generic attributes should not be ("parent" comes to mind). Second,
there are significant optimizations possible to the generic
attribute mechanism used today. (A HashMap is not the best
data structure for this case, nor are Strings the best choice
as keys.)
We've also got an open issue to re-evaluate UIComponent vs.
UIComponentBase, and will specifically address the problem
you mention.
Thanks again.

Similar Messages

  • Can I perform future holds for a lot

    Hi
    Can I perform future hold for a lot in OSFM Module.
    I want to hold a lot for further process, once it crosses a specific operation. Or I want to hold it after so and so date.
    Please post your advises.
    We are using 11.5.10+ version
    regards
    Sreee

    This is a good requirement however unfotunately this is not supported currently in OSFM..
    Thanks - rakesh

  • Performance - navigation attributes

    Hi,
    we have a very bad performance with our reports, because we use many navigation attributes. So I want to disable those we don't need.
    My question is: Do I have to delete the nav flag in the InfoObject where this navigation attribute was created or is it the same effect for a better query performance when i only disable the navigation attribute in the InfoCube and in the MultiCube (and keep it in the InfoObject active)?
    thx
    Robert

    Hi Robert,
    You only need to remove the nav attr from being used in your queries. If it is difficult to control that (due to many users creating their own queries) then you can uncheck the Nav Attr in the cube or mulitprovider. No need to change it at the InfoObject level.
    Hope this helps...

  • Why not perform the ${attribute} syntax in the jsp context with weblogic?

    In the action an attribute has been put in request object, example request.setAttribute("userName","Xue Chen").
    in the forward jsp , use the syntax ${userName}, can not get the attribute "Xue Chen" from request, but the "${userName}" be printed in the page.
    The same code with Tomcat, it work well.
    It maybe the syntax ${userName} in jsp is not standard for all application server, only work in Tomcat, or it need special confiugre in weblogic, this syntax can work.
    Does anyone do me a favors?

    Hi,
    go to the context of your view,
    to the attribute of your date,
    and set the attribute input help mode to disabled
    grtz,
    Koen

  • Query performance on RAC is a lot slower than single instance

    I simply followed the steps provided by oracle to install a rac db of 2 nodes.
    The performce on Insertion (java, thin ojdbc) is pretty much the same compared to a single instance on NFS
    However the performance on the select query is very slow compared to single instance.
    I have tried using different methods for the storage configuration (asm with raw, ocfs2) but the performance is still slow.
    When I shut down one instance, leaving only one instance up, the query performance is very fast (as fast as one single instance)
    I am using rhel5 64 bit (16G of physical memory) and oracle 11.1.0.6 with patchset 11.1.0.7
    Could someone help me how to debug this problem?
    Thanks,
    Chau
    Edited by: user638637 on Aug 6, 2009 8:31 AM

    top 5 timed foreground events:
    DB CPU: times 943(s), %db time (47.5%)
    cursor.pin S wait on X: wait(13940), time (321s), avg wait(23ms), %db time (16.15%)
    direct path read (95,436), times (288), avg watie (3ms), %db ime (14.51%)
    IPC send completion sync: wait(546,712), times(149s), avg wait (0), %db time (7.49%)
    gc cr multi block request: waits (7574), teims (78) avg wait (10 ms), %db time (4.0)
    another thing i see is the "avg global cache cr block flush time (ms): is 37.6 msThe DB CPU Oracle metric is the amount of CPU time (in microseconds) spent on database user-level calls.
    You should check your sql statement from report and tuning them.
    - Check from Execute Plan.
    - If not index, determine to use index.
    SQL> set autot trace explain
    SQL> sql statement;
    cursor: pin S wait on X.
    A session waits on this event when requesting a mutex for sharable operationsrelated to pins (such as executing a cursor), but the mutex cannot be granted becauseit is being held exclusively by another session (which is most likely parsing the cursor).
    use variable SQL , avoid dynamic sql
    http://blog.tanelpoder.com/2008/08/03/library-cache-latches-gone-in-oracle-11g/
    check about memory MEMORY_TARGET initialization parameter.
    By the way you have high "DB CPU"(47.5%), you should tune about your sql statement (check sql in report and tune)
    Good Luck

  • Qual Insp:Perform partial qty REJECT in QA12 for Material GR inspection lot

    Dear All,
    Please advice me for a scenarion.
    I perform MIGO-GR - MType 103 for 5 qty, material moves to GR Blkd Stk.
    Then perform MIGO-RelBlkSTk - MType 105 for 5 qty, the material moves from GRBlkStk to QualtInspStk.
    The perform QA32 for the insp lot , and ACCEPT the 5 qty to UnrestStk.
    This acceptence movement calculates the Vendor Evaluation Quality criteria also.
    I can also REJECT the above inspection lot by QA12 : Change Usage Decision, this rejects the full 5 qty, and this also has impact in vendor evaluation quality criteria rating. Then Return to the Vendor the 5 qty.
    My query is:
    Now if i want to return PARTIAL qty to the vendor ALONG WITH VENDOR RATING RETURN CALCULATION.
    I am unable to enter partial qty in the QA12, in the 'Inspection Lot tab' in the 'To Be Posted' column.
    The whole column is non-editable, is it standard by default as non-editable?
    Am i performing the right steps for my requirement?
    Thanks in advance,
    Joy Ghosh

    Hi
    In QA12, after entering appropriate Usage decision, click on "defective quantity" tab at header, and there enter the quantity.
    Umakanth R

  • What does EVDRE: applying Rangebefore/range after stand - It is taking lot

    When we do any refersh. we find sysem is taking lot of time by showing below message in excel.
    what does this mean. how we can reduce the time which system takes in this activity

    Hi,
    Expanding one sheet taking 1.5 minutes may attribute to the extend to which the expansion is used. The performance, in fact, depends on lot of things (the way the expansion is taking place, the amount of formulas in the template, etc). It will be really difficult to suggest anything without taking a look. Having said this, optimization of application might improve the performance.
    Hope this helps.

  • Performance Issues with Folio format in Ipad.

    Hello everyone! My FIRST post here!!!
    I work with educational games and I'm facing performance issues with games that I've made in HTML5 to play in Ipad. I tried to import them to the format folio in DPS (Adobe Digital Publishing Suite). However when I import the HTML game into Indesign and try to preview it in Adobe content viewer, the game doesn't open or works without perform properly (there is a lag that doesn't let you play the game with a little of fun).
    The games that I've created have a memory use max of 35mb and weighs 30mb max.
    Does anyone know what's happen and what I can do to fix that performance issue?
    Thanks a lot!

    Moved to DPS

  • Low Performance in the report with cell defition

    Hi all,
    In one of our queries (3.5), we had to use lots of cell definition. And after execution of the report, it stays in "Formatting Result Area" and "Retrieving Result from BW Server" for a very long time (about 30 minutes).
    There is already aggregate on the infoprovider and report uses it.
    Is there any way to increase reporting performance of a report with lots of cell definitions ?
    Thanks
    SP

    Arun,
    Can you please explain what is precalculation and how to use it in Bex?
    Thanks in advance.
    SP

  • Performance issue of report

    Hi Friends,
    Can you please give me the exact answer for the below question.
    Suppose my report program is taking long time to execute, what are the reasons that may effect the report.
    and what are the remedies should i follow, please provide appropriate answer.
    Advance thanks,
    Chandra.

    hi,,
    Go to tranx SE30 here you will get Tips and Trciks for the performance tuning.
    Check it carefully and check whether you can do something for improving performance of you code.
    It will help you a lot and will reduce your Execution time.
    If you are using READ TABLE command in your program then you can check whether you can use HASHED TABLE it will improve performance of your code a lot but it has some restrictions.
    I will explain some of the points to improve the performance of the report try to write code according to that ok.
    SOME STEPS USED TO IMPROVE UR PERFORMANCE:
    1. Avoid using SELECT...ENDSELECT... construct and use SELECT ... INTO TABLE.
    2. Use WHERE clause in your SELECT statement to restrict the volume of data retrieved.
    3. Design your Query to Use as much index fields as possible from left to right in your WHERE statement
    4. Use FOR ALL ENTRIES in your SELECT statement to retrieve the matching records at one shot.
    5. Avoid using nested SELECT statement, SELECT within LOOPs.
    6. Avoid using INTO CORRESPONDING FIELDS OF TABLE. Instead use INTO TABLE.
    7. Avoid using SELECT * and Select only the required fields from the table.
    8. Avoid nested loops when working with large internal tables.
    9. Use assign instead of into in LOOPs for table types with large work areas
    10. When in doubt call transaction SE30 and use the examples and check your code
    11. Whenever using READ TABLE use BINARY SEARCH addition to speed up the search. Be sure to sort the internal table before binary search. This is a general thumb rule but typically if you are sure that the data in internal table is less than 200 entries you need not do SORT and use BINARY SEARCH since this is an overhead in performance.
    12. Use "CHECK" instead of IF/ENDIF whenever possible.
    13. Use "CASE" instead of IF/ENDIF whenever possible.
    14. Use "MOVE" with individual variable/field moves instead of "MOVE-
    CORRESPONDING", creates more coding but is more effcient.
    Reward points if helpful.
    regards,
    rekha

  • New Format for creating Attribute Sets.

    Hi,
    In SAP CRM webclient ui 7.0 there is a new format for creating Attribute Sets. The format is 'value table'.
    On selecting Format=Value Table the field 'Table' comes up.
    There is a message: Here you can enter a table that contains all the values you want to use. This is particularly useful for attributes with a lot of values or if you want to enter multiple attributes with the same values. The table must be a check table with a search help.
    Do I need to create a table with all the fields in in marketing attribute assignment block with search help on attributes field.
    Can you please guide as to how I should go about this issue.
    Regards,
    John.

    Hi John,
    The Attribute Set of Format type 'Value Table' is for the Mutiple Attribute Sets. These can be either a Single Attribute Set with Multiple values or the Multiple Attribute Sets with One value.
    You can include all such marketing attributes into one table which is a check table with search help. and use this as the Value Table.
    Hope this helps you out!
    Regards
    Veena.

  • BPM Performance monitoring

    Hi experts,
    I would like to monitorize the performance of my BPMs. I want to know how much each BPM last. This information it's available in SXMB_MONI -> PE, there I can know that by watching to begining and end of each singular process. 1.-How can I achieve to watch this information for many processes? (RTWB??) I'm sending tests of 10, 100 and 1000 process so its not nice going to SXMB_MONI -> PE for each one.
    By the way I'm having performance problems when sending a lot of them. 2.-Do you know if theres is any way of improve the performance? (like having a Queue of processes or similar)
    Regards
    Gonzalo

    Goncalo,
    This is what i did when i had to do a BPM perf analysis..just pasting my notes here...
    1) go to moni, set your filters to find your complete roundtrip for the message..go to your outbound column, click on PE, Calculate the time difference between the first and the last entry..
    Repeat this for several of the msgs to get a mean time..once you have a time..then you can start breaking down this into why and where its taking time...then analyze the bpm.
    Check if any one particular step ..has the time it takes ..going up, check specifically the transformations..are they taking too much time..
    Log into your xi server..run transactin ST03N, there switch to expert mode..filter in your time for the msgs...remember the user doing all this is always wf-batch..., Here you can analyze the load created by the bpe engine..
    let me know if you need more info..
    Regards
    Ravi Raman
    Reward points if helpful..!
    Let me know if you need more info..
    Regards
    Ravi Raman
    Reward points if helpful !

  • Using VM level application constant to set the attributes on the interview screen

    Hi All,
    We have a Performed By as one of the interview question which should be defaulted with the user id of the person who launched the OPA session (through web determinations).
    There is a user-id application constant which is available at the VM layer. Is there a way to set the Performed By question on the interview screen with this user-id by modifying the VM templates?
    Please help.
    Thanks,
    KK

    I tried with that code, its giving compile error for this: Can you please let me know what I am missing here:
    PreSeedValues.java:44: isUnknown(com.oracle.determinations.engine.EntityInstance
    ) in com.oracle.determinations.engine.Attribute cannot be applied to ()
                    boolean userIdKnown = (! performedBy.isUnknown()) && (! performe
    dBy.isUncertain() );
    Because an attribute exists for an entity, it can have different values across different instances, so, when you try to get the value (or check its know/unknown state) you need to pass in the entity instance. In you case the global entity instance: performedBy.isUnknown(ruleSessionGlobal) and performedBy.isUncertain(ruleSessionGlobal)
    Also, one more thing, we have around 50 different screens and each screen has this performed by attribute with different name. Now to set this in code, it would not be a good idea to write 50 lines for different performed by attributes. Can we have something like getting the screen name for the current screen in user context and user that as a prefix for the attrubute name. e.g. RA0084_Sheet_Performed_By in this RA0084_Sheet will be the interview screen name.
    It sounds like you want to set the user id when each screen is submitted. The OnInvestigationStartedEvent will only fire once, when the investigation starts. If you want to set an attribute when a screen is submitted, you probably want to use something like a OnValidateScreenEventHandler which is fired when a screen is submitted and has the screen details in the event.
    See Events and Event Handlers in Oracle Policy Automation Developer's Guide

  • IPhone 2D Image Performance

    Hi all,
    I'm developing a 2D game for iPhone and am at the point where I need to consider my drawing options.
    Initially I chose to do batched 2D textured quads with OpenGL ES, then I realized that the iPhone doesnt support vertex buffers, so each sprite will need its own draw call.
    So now I'm wondering whether its faster to do this with OpenGL or to just use the Core Graphics image object and just blit to the screen for each sprite?
    Does anyone have any solid info on which is better from a performance standpoint?
    Thanks a lot!
    -Winston

    One thing to check is Settings > Bluetooth.  The update process turns it on.  Turn it off if you don't use it.

  • Performance tuning of Oracle 10 g

    Dear Team ,
    I am in need of tuning my Database against the performance .
    I have visited lots of Web pages in Net for Performance tuning .
    It shows some values for the Performance tuning , But I dont how to read the values
    Wheather my database is good or it need to tuned again .
    So kindly help me for good performance tuning in my Database (Oracle 10g)
    Regards
    Augustine

    Hi Augustine;
    I am in need of tuning my Database against the performance .
    I have visited lots of Web pages in Net for Performance tuning .
    It shows some values for the Performance tuning , But I dont how to read the values
    Wheather my database is good or it need to tuned again .First step should be run ASH AWR report than check your CPU usage(also other parameter) from Oracle Enterprise Manager console.
    Check top5 event and try to understand what is happining on ur database. Actualyy There is no specific answer for your question, just check report try to understand to what eat your source? when it happens?what is fruquence etc.. So just run report and observe it
    Check below search
    http://www.google.com.tr/search?q=Performance+tuning+of+Oracle+10&rls=com.microsoft:en-us&ie=UTF-8&oe=UTF-8&startIndex=&startPage=1&redir_esc=&ei=v0fxS8bTCtOrsAaYqfTbAg
    There are many docs related performance.
    Hope it helps
    Regard
    Helios

Maybe you are looking for

  • USB Midi Controller not recognized by Mac?

    hey there I have just attempted to plug in my trusty Edirol PCR300 to my mac for the first time. It currently works on my PC I installed the 2.0.0 driver as per instructions on Edirol website, rebooted, plugged in and turned on the device. The device

  • Java Mapping Design Question

    Hi All, I have a Java mapping requrement for which I would like some suggestions. I have 3 variables:      1) price      2) price factor      3) pricing condition There is already quite a bit of logic determining these. The new requirement is that if

  • I have light leaking from the right top corner of my iPhone 5.is it a problem or a major thing. Is there anyone, who hasn't got this problem?

    I noticed light leaking from the top right corner of my new iPhone 5 from a small area. I noticed first, when I changed the brightness to higher and when I changed back the light was still there.

  • Screen saver toggles between 2 photos

    My O/S 10.5.5 screen saver is set to use photos from my iPhoto albums. It cycles properly for a few minutes and then settles on 2 photos and oscillates back and forth. Each time this happens the photos that oscillate are not the same as before. I nev

  • Create table from DTD

    Does anyone know of a simple way to generate a table (either a SQL build script or an actual table) from a DTD file? I have developers in my shop capturing XML documents and storing them in a CLOB field in a table. I want to be able to parse this CLO