Ticket #1771 (closed enhancement: fixed)
Table: size() function called more times than needed
| Reported by: | Jens Jansson | Owned by: | Marko Gronroos |
|---|---|---|---|
| Priority: | trivial | Milestone: | User Interface Library 5.3.0 RC |
| Component: | Server-side framework | Version: | 5.1.2 |
| Keywords: | Cc: | ||
| Known Issue description: | |||
| Hours estimate: | Deadline (dd.mm.yyyy): | ||
| Known Issue version (since): | Known Issue title: | ||
| Hours done: | Depends to: | ||
| Affects documentation: | no | ||
| Known Issue workaround: | |||
| Affects release notes: | no | Contract: | |
Description
The table contains functions that constantly needs the size of the container to perform its duties. You get this size by calling size(). However, size() is called multiple times inside tablefunctions instead of just storing the function and this causes unnecessary function calls. For example refreshRenderedCells() has six occurrences of size() A better solution would be to call size() the first time it is needed inside the function and store it to a temporal variable.
refreshRederedCells() changes would therfore be Line ~1163: int size = size(); and thereafter every occurence of size() -> size
Change History
Note: See
TracTickets for help on using
tickets.
