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
entryCache in Modules can take up a bit of amount of memory after processing all YANG modules. For our use case, after processing all YANG modules, calls to ToEntry, which accesses the entryCache, happen very infrequently, if at all. Therefore, it is ideal to clear the cache to free up memory.
I don't think this should not compromise on correctness. Even if entryCache is cleared, calling ToEntry will just recurse and cache the relevant nodes again.
Issue #248 also refers to this issue. Creating this issue as this relates only to entryCache.
The text was updated successfully, but these errors were encountered:
sengleung
added a commit
to sengleung/goyang
that referenced
this issue
Nov 7, 2023
This function clears the entryCache in Modules to free up memory
after processing modules. entryCache is used by the ToEntry function
to cache previously converted nodes.
Fixesopenconfig#259
This function clears the entryCache in Modules to free up memory
after processing modules. entryCache is used by the ToEntry function
to cache previously converted nodes.
Fixes#259
entryCache
is instantiated byModules
goyang/pkg/yang/modules.go
Lines 35 to 37 in a34098e
and is used only by the
ToEntry
function.goyang/pkg/yang/entry.go
Lines 562 to 567 in a34098e
entryCache
inModules
can take up a bit of amount of memory after processing all YANG modules. For our use case, after processing all YANG modules, calls toToEntry
, which accesses theentryCache
, happen very infrequently, if at all. Therefore, it is ideal to clear the cache to free up memory.I don't think this should not compromise on correctness. Even if
entryCache
is cleared, callingToEntry
will just recurse and cache the relevant nodes again.Issue #248 also refers to this issue. Creating this issue as this relates only to
entryCache
.The text was updated successfully, but these errors were encountered: