Documentation
¶
Overview ¶
Package pool provides memory pooling utilities for the defuddle content extraction system. It offers sync.Pool instances for commonly used objects to reduce garbage collection overhead.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var NodeSlicePool = sync.Pool{ New: func() any { return make([]*goquery.Selection, 0, 100) }, }
NodeSlicePool provides pooled slices for goquery selections This helps reduce memory allocations during DOM traversal
StringBuilderPool provides pooled string builders This helps reduce memory allocations during string concatenation
StringSlicePool provides pooled string slices This helps reduce memory allocations during string processing
Functions ¶
func GetNodeSlice ¶
GetNodeSlice gets a node slice from the pool
func GetStringBuilder ¶
GetStringBuilder gets a string builder from the pool
func GetStringSlice ¶
func GetStringSlice() []string
GetStringSlice gets a string slice from the pool
func PutNodeSlice ¶
PutNodeSlice returns a node slice to the pool
func PutStringBuilder ¶
PutStringBuilder returns a string builder to the pool
func PutStringSlice ¶
func PutStringSlice(slice []string)
PutStringSlice returns a string slice to the pool
Types ¶
This section is empty.