You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lottie is supported and developed on nights and weekends. Issues from Lottie sponsors will be prioritized.
Is your feature request related to a problem? Please describe.
The L.beginSection and L.endSection methods are used to record some trace information and are frequently called during the draw process. Although traceEnabled is by default false, L.beginSection and L.endSection methods do not perform any substantive logic. However, they generate a large number of strings at the method call sites, leading to frequent garbage collection issues (occurring continuously in a short period due to the excessively frequent invocation of draw).
Describe the solution you'd like
Provide the isTraceEnabled method in the L class to return the value of the traceEnabled variable. Before calling the L.beginSection and L.endSection methods, first check if isTraceEnabled is true. If not, do not invoke them.
Describe alternatives you've considered
You can use inline methods in Kotlin to handle calls to the trace method, but this change is quite significant and requires rewriting the source code in Kotlin.
The text was updated successfully, but these errors were encountered:
Lottie is supported and developed on nights and weekends. Issues from Lottie sponsors will be prioritized.
Is your feature request related to a problem? Please describe.
The L.beginSection and L.endSection methods are used to record some trace information and are frequently called during the draw process. Although traceEnabled is by default false, L.beginSection and L.endSection methods do not perform any substantive logic. However, they generate a large number of strings at the method call sites, leading to frequent garbage collection issues (occurring continuously in a short period due to the excessively frequent invocation of draw).
Describe the solution you'd like
Provide the isTraceEnabled method in the L class to return the value of the traceEnabled variable. Before calling the L.beginSection and L.endSection methods, first check if isTraceEnabled is true. If not, do not invoke them.
Describe alternatives you've considered
You can use inline methods in Kotlin to handle calls to the trace method, but this change is quite significant and requires rewriting the source code in Kotlin.
The text was updated successfully, but these errors were encountered: