Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Lots of components, handleUIDLMessage takes a long time

Peter Pavlomanolakos
5 years ago May 05, 2016 4:22am

Hi all,

I'm trying to diagnose a performance issue with a page I've built that has a lot of components (around ~400, mostly TextFields and Labels). The page has a number of controls on it that cause a bunch of panels with a bunch of components on them to be destroyed and replaced with new instances. This takes a few seconds; I'm trying to make it faster.

I've narrowed it down to the client side processing step. Looking at the debug log, I can see that the "handleUIDLMessage" step takes 1836ms, which seems to be the bulk of the processing time. I suspect it's because there are simply too many components on the page (which I'm planning to address by turning groups of read-only components into a single label component with ContentMode.HTML), but I'm at a loss as to what other tools or steps I can use to analyze the issue further, or other ideas on how to improve performance. Could someone point me in the right direction?

1280ms    Starting application AWebwebapp10-580210449
1288ms    Using theme: ATheme
1289ms    Vaadin application servlet version: 7.6.2
1301ms    Setting hearbeat interval to 300sec.
1310ms    JSON parsing took 2.265ms
1313ms    Handling message from server
1316ms    * Handling resources from server
1317ms    * Handling type inheritance map from server
1319ms    Handling type mappings from server
1325ms    Handling resource dependencies
1327ms    * Handling meta information
1328ms    * Creating connectors (if needed)
1370ms    VMenuItem constructor
1426ms    VMenuItem constructor
1444ms    VMenuItem constructor
1462ms    VMenuItem constructor
1489ms    VMenuItem constructor
1511ms    VMenuItem constructor
1526ms    VMenuItem constructor
1537ms    VMenuItem constructor
1547ms    VMenuItem constructor
1556ms    VMenuItem constructor
1565ms    VMenuItem constructor
1578ms    VMenuItem constructor
1588ms    VMenuItem constructor
1598ms    VMenuItem constructor
1609ms    VMenuItem constructor
1623ms    VMenuItem constructor
1623ms    * Updating connector states
1725ms    * Handling locales
1727ms    * Updating connector hierarchy
1728ms    extend
1730ms    extend
1733ms    extend
1734ms    extend
1735ms    extend
1737ms    extend
1739ms    extend
1739ms    extend
1740ms    extend
1741ms    extend
1741ms    extend
1742ms    extend
1743ms    extend
1745ms    extend
1748ms    extend
1749ms    extend
1752ms    * Sending hierarchy change events
2086ms    * Running @DelegateToWidget
2089ms    * Sending state change events
2123ms    VMenuItem constructor
2154ms    VMenuItem constructor
2157ms    VMenuItem constructor
2190ms    VMenuItem constructor
2193ms    VMenuItem constructor
2215ms    VMenuItem constructor
2216ms    VMenuItem constructor
2235ms    VMenuItem constructor
2236ms    VMenuItem constructor
2237ms    VMenuItem constructor
2238ms    VMenuItem constructor
2251ms    VMenuItem constructor
2254ms    VMenuItem constructor
2255ms    VMenuItem constructor
2257ms    VMenuItem constructor
2268ms    VMenuItem constructor
2269ms    VMenuItem constructor
2272ms    VMenuItem constructor
2273ms    VMenuItem constructor
2287ms    VMenuItem constructor
2288ms    VMenuItem constructor
2288ms    VMenuItem constructor
2289ms    VMenuItem constructor
2300ms    VMenuItem constructor
2302ms    VMenuItem constructor
2302ms    VMenuItem constructor
2303ms    VMenuItem constructor
2310ms    VMenuItem constructor
2310ms    VMenuItem constructor
2311ms    VMenuItem constructor
2312ms    VMenuItem constructor
2321ms    VMenuItem constructor
2323ms    VMenuItem constructor
2326ms    VMenuItem constructor
2326ms    VMenuItem constructor
2340ms    VMenuItem constructor
2341ms    VMenuItem constructor
2345ms    VMenuItem constructor
2348ms    VMenuItem constructor
2358ms    VMenuItem constructor
2358ms    VMenuItem constructor
2359ms    VMenuItem constructor
2359ms    VMenuItem constructor
2373ms    VMenuItem constructor
2374ms    VMenuItem constructor
2387ms    VMenuItem constructor
2388ms    VMenuItem constructor
2388ms    VMenuItem constructor
2389ms    VMenuItem constructor
2403ms    VMenuItem constructor
2408ms    VMenuItem constructor
2410ms    VMenuItem constructor
2412ms    VMenuItem constructor
2413ms    * Passing UIDL to Vaadin 6 style connectors
3160ms    * Performing server to client RPC calls
3164ms    * Unregistered 0 connectors
[b]3164ms    handleUIDLMessage: 1836 ms[/b]
3166ms    Starting layout phase
3205ms    Measured 96 non connector elements
3428ms    Pass 1 measured 313 elements, fired 257 listeners and did 1 layouts.
3431ms    Did overflow fix for 1 elements
3470ms    Pass 2 measured 135 elements, fired 94 listeners and did 1 layouts.
3472ms    Did overflow fix for 1 elements
3652ms    Pass 3 measured 833 elements, fired 45 listeners and did 61 layouts.
3698ms    Pass 4 measured 61 elements, fired 0 listeners and did 1 layouts.
3706ms    Pass 5 measured 1 elements, fired 0 listeners and did 0 layouts.
3713ms    Did overflow fix for 1 elements
3724ms    Pass 6 measured 1 elements, fired 0 listeners and did 0 layouts.
3725ms    No more changes in pass 7
3727ms    Total layout phase time: 561ms
3728ms    * Dumping state changes to the console
3728ms    UIDL: undefined
4037ms    First response processed 5069 ms after fetchStart
[b]4037ms    Processing time was 2723ms[/b]
4039ms    Referenced paintables: 464
4259ms    Establishing push connection
4575ms    Push connection established using websocket