Suchen

Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

Chapter 9. Performance Tuning

download PDF

9.1. Performance Tuning Tips

Note
Since JBoss Fuse 6.3, the Smooks component for SwitchYard is deprecated and will be removed in a future release of JBoss Fuse.
Cache and reuse the Smooks object.
Initialization of Smooks takes some time and therefore it is important it is reused.
Pool reader instances where possible
This can result in a huge performance boost, as some readers are very expensive to create.
Use SAX filtering where possible
SAX processing is a lot faster than DOM processing and uses less memory. It is mandatory for processing large messages. Check that all of the Smooks cartridges are SAX-compatible.
Turn off debug logging
Smooks performs some intensive debug logging in parts of the code. This can result in significant additional processing overhead and lower throughput.
Important
Remember that not having your logging configured at all may result in debug log statements being executed.
Only use the HTMLReportGenerator in a development environment.
When it has been enabled, the HTMLReportGenerator incurs a significant performance overhead and with large message, can even result in OutOfMemory exceptions.
Contextual selectors
Contextual selectors can obviously have a negative effect on performance. For example, evaluating a match for a selector like "a/b/c/d/e" will obviously require more processing than that of a selector like "d/e". Obviously there will be situations where your data model will require deep selectors, but where it does not, you should try to optimize your selectors for performance.
Where possible, avoid using the Virtual Bean Model and create beans instead of maps. Creating and adding data to Maps is a lot slower than creating "plain old Java objects" (POJOs) and calling the "setter" methods.
Red Hat logoGithubRedditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

© 2024 Red Hat, Inc.