update filestorage
This commit is contained in:
@@ -56,6 +56,11 @@ func (fs *FileStore) Search(ctx context.Context, query string, limit int) ([]web
|
||||
|
||||
var matchingLines []string
|
||||
scanner := bufio.NewScanner(file)
|
||||
// Use a 10MB buffer for the scanner to handle large trace/log entries
|
||||
const maxCapacity = 10 * 1024 * 1024
|
||||
buf := make([]byte, 64*1024)
|
||||
scanner.Buffer(buf, maxCapacity)
|
||||
|
||||
// Lowercase query for case-insensitive search
|
||||
lowerQuery := strings.ToLower(query)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user