Tags: webfirmframework/wff
Tags
Client side JavaScript code optimization which may reduce CPU and memory consumption in the client browser page if there is a continues delivery of UI updates from the server. However, the difference may be negligible.
Code optimization for performance improvement.
- Implemented `jsonMapFactory` and `jsonListFactory` in `JsonParser`. - Thread-safety and performance improvements. - Now, for `appendChildren`, `prependChildren`, `insertAfter`, `insertBefore`, `replaceWith` & `addInnerHtmls` methods, there is only a single implementation. If the given tags by these methods already exist in the browser page, the server will not send its entire tag data; instead, it will send only the wff id, and using its wff id the tags will be moved in the browser page for the ui changes. It will save a lot of data transfer in many scenarios, eg: There is table in the browser page and it contains a large number of rows. The rows are sorted and added again to the `TBody` tag without removing it from the browser page, in such case we can see a significant performance improvement as it doesn't transfer the whole tags data to the UI. - Code optimization in `SharedTagContent`.
A major thread-safety bug fix in `SharedTagContent` reported in #97. The bug is it throws `NullPointerException` while calling `setContent`/`detach` method if async update is enabled. To workaround this issue, disable async update by `setAsyncUpdate` method. By default, it is disabled. JVM related improvements to prevent CPU overheating in a special multi-threading scenario.
Support for basic JSON parser. - Implemented `getValueAsWffBMObject` & `getValueAsWffBMArray` methods in `WffBMArray` & `WffBMObject`. - Optimized code for performance improvement.
Reduced the size of payload sending from the server to the client by implementing version 3 of Wff BM Bytes tag data compression algo. This should deliver data faster than before. Bug: set uri from the server side using `browserPage.setURI` then click on back button on browser, it doesn't invoke the `whenURI` event. This bug is fixed now. The workaround to fix this issue till _wffweb-12.0.2_ is to call `wffGlobal.getAndUpdateLocation();` inside the `wffGlobalListeners.onSetURI` function implementation in the project. More finder methods `findOneAttributeByFilter`, `findAttributesByFilter` etc.. in `TagRepository`. Implemented more feature methods in `WffBMObject` & `WffBMArray` to get values in different datatypes. They are: - `getValueAsBigDecimal` - `getValueAsBigInteger` - `getValueAsInteger` - `getValueAsLong` - `getValueAsDouble` - `getValueAsFloat` - `getValueAsBoolean` - `getValueAsString` Implemented overloading `put(...` methods in `WffBMObject`. They are: - `put(String key, Number value)` - `put(String key, Boolean value)` - `put(String key, WffBMObject value)` - `put(String key, WffBMArray value)` - `put(String key, WffBMByteArray value)` Implemented other `put...(...` methods in `WffBMObject`. They are: - `putNull(String key)` - `putUndefined(String key)` - `putRegex(String key, String regex)` - `putString(String key, String string)` - `putFunction(String key, String function)` Implemented method `similar` in `WffBMObject` and `WffBMArray` to check if two objects contents are equal. Implemented `toStream` method in `WffBMNumberArray`. In `AbstractHtml`, validating the appending/prepending children only if the debug mode is turned on by `WffConfiguration.setDebugMode(true)`. If it is turned off it will save some memory and CPU consumption so it is turned off by default. Annotated `serialVersionUID` with `@Serial` in appropriate places. Test cases are added for all new features.
Added `readState` method in `SharedTagContent`. Added utility methods in `URIUtil` class for building url query string. Added more finder methods in `TagRepository` class. Code syntax performance improvements in `TagRepository`. Micro optimization for performance improvement in `TagRepository`. Javadoc needful improvements.
Release changes: - Improved reliability of sending client ping message. - The internal thread locking mechanism is optimized with a better alternative implementation. - Minor bug fix in `AbstractHtml` (related to add child method). - Upgraded code syntax in appropriate places. - Minor optimization in `BrowserPageContext`. - Session handling improvements in `BrowserPageContext`. - Thread-safety improvements in `SharedTagContent` to avoid unwanted async behavior. - Upgraded test scope dependencies. Support for `ParentGainedListener` and `ParentLostListener` in tag class. `ParentGainedListener` will be invoked when a tag gains a new parent and `ParentLostListener` will be invoked when a tag loses its parent. Needful methods such as `addParentGainedListener`, `removeParentGainedListener`, `addParentLostListener`, `removeParentLostListener` etc.. will be available in `AbstractHtml` so that they can be accessed by any tag class. Implemented is `isValid` methods in `PayloadProcessor` which will be useful in websocket config. Refer the sample project websocket config for its usage. - Made `BrowserPageContext.runAutoClean` public to allow to run a manual cleanup.
There is no major bug found in `wffweb-12.0.0-beta.12` so `wffweb-12.0.0` is the same copy of it. The only change done in `wffweb-12.0.0` is some minor improvements in javadoc comment.
- Performance improvements for `SharedTagContent` - New feature methods for `SharedTagContent` - Major thread-safety improvements for `SharedTagContent` to be compatible it with whenURI feature (to avoid deadlock) - Data consistency improvements for `SharedTagContent` - Thread-safety improvements for attribute classes - New methods for attribute classes - Optimizations and code syntax improvements - `hasPendingTask` - `pendingTasksSize` - `setAsyncUpdate` - `isAsyncUpdate` - `getContentWithType` - `removeAllValues` - `assignValue` - `removeAllClassNames` - `removeAllHeaderIds` - `setValue` - `assignValue` - `removeAllValues` - `setCssProperties` - `assignCssProperties` - `removeAllCssProperties` - `textIfRequired` - `htmlIfRequired` The javadoc contains the usage of these methods.
PreviousNext