Good to hear!
This is the update-handler for custom content, you can find the method param when you search for PrimeFaces.ajax.Response.handle; example in forms.selectonemenu.js line 973
SelectOneMenu: Options to improve client side (browser) render performance?
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
Thomas Andraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
Not sure i dont know what happens. If you can explain, i can try to understand your case with "whitespace content"So I assume it would make sense to add an optimization path for the common case of only whitespace content?
Thomas Andraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
Sorry for being too terse.
What I meant is, that an overwhelming number of all p:selectOneMenus in the wild will not contain any custom content.
My assumption is, that in this case the content argument will be empty and we may be able to skip the parsing.
I might be utterly wrong though. In this case please ignore
What I meant is, that an overwhelming number of all p:selectOneMenus in the wild will not contain any custom content.
My assumption is, that in this case the content argument will be empty and we may be able to skip the parsing.
Code: Select all
onsuccess: function(responseXML, status, xhr) {
PrimeFaces.ajax.Response.handle(responseXML, status, xhr, {
widget: $this,
handle: function(content) {
var $content = $($.parseHTML(content));
var $ul = $content.filter('ul');
$this.itemsWrapper.empty();
$this.itemsWrapper.append($ul);
var $select = $content.filter('select');
$this.input.replaceWith($select);
}
});
return true;
},
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
yep, please debug
Thomas Andraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
Ok, I spend some more time with this.
First, the content is indeed never empty in the onsuccess function shown above, but this does not matter.
Second, the last performance bottleneck shown is a call to paginate.onsuccess (Ajax pagination), containing the new 200 rows for the data table (1 MB in size).
I fear that other than cutting down on complexity of the table content there is no other way to speed this up.
Thank you for bearing with my ineptitude with Javascript tools and the quick fixes. Regarding the performance of SelectOneMenu I think we can close this.
First, the content is indeed never empty in the onsuccess function shown above, but this does not matter.
Second, the last performance bottleneck shown is a call to paginate.onsuccess (Ajax pagination), containing the new 200 rows for the data table (1 MB in size).
I fear that other than cutting down on complexity of the table content there is no other way to speed this up.
Thank you for bearing with my ineptitude with Javascript tools and the quick fixes. Regarding the performance of SelectOneMenu I think we can close this.
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
What exctly is paginate.onsucess? Maybe we can optimize this method
Thomas Andraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
See line 1388 in datatable.js, calling updateData() in line 4256. The time is spent in appending child nodes.
Maybe native methods are faster than jquery append operations?
I added another performance trace for reference: https://www.file-upload.net/download-13 ... e.png.html
Maybe native methods are faster than jquery append operations?
I added another performance trace for reference: https://www.file-upload.net/download-13 ... e.png.html
-
- PrimeFaces Core Developer
- Posts: 3979
- Joined: 03 Dec 2010, 14:11
- Location: Bavaria, DE
- Contact:
Yep, i see
of course native is faster
Can you try to change updateData by yourself and test everything + compare the results?
of course native is faster
Can you try to change updateData by yourself and test everything + compare the results?
Thomas Andraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
PrimeFaces | PrimeFaces Extensions
Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE
Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko
-
- Information
-
Who is online
Users browsing this forum: No registered users and 24 guests