Remove all RDEPUBBackgroundTrace.log and bare print diagnostic calls
Keep only the evaluateFullPageMapTakeover: fullReplace diagnostic log in RDEPUBPageMapReconciliationCoordinator.swift for future debugging. Simplified RDEPUBBackgroundTrace to just the log method (removed measure and debug gating). Removed all [EPUB][...], [ReadViewDemo], and [EPUB][Pagination] print statements across the project. Also includes earlier bug fixes: - Fix stale currentPageNumber in extendPartial commit - Fix pageCurl rebindVisiblePage during transition - Fix keepCurrentWindow not removing pending update from queue - Fix right-aligned text (巫鸿 bug) via avoidPageBreakInside, tail merger, and continuation paragraph normalization - Add text-indent reset for aligned blocks in CSS compatibility layer Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -69,10 +69,6 @@ final class RDEPUBBackgroundCoverageStore {
|
||||
segments[index] = mergedSegment
|
||||
currentMemoryBytes = currentMemoryBytes - existing.estimatedMemoryBytes + mergedSegment.estimatedMemoryBytes
|
||||
merged = true
|
||||
RDEPUBBackgroundTrace.log(
|
||||
"CoverageStore",
|
||||
"merged segments: \(existing.lowerSpineIndex)-\(existing.upperSpineIndex) + \(segment.lowerSpineIndex)-\(segment.upperSpineIndex)"
|
||||
)
|
||||
break
|
||||
}
|
||||
}
|
||||
@@ -84,11 +80,6 @@ final class RDEPUBBackgroundCoverageStore {
|
||||
}
|
||||
|
||||
lastAccessTime[segment.lowerSpineIndex] = CFAbsoluteTimeGetCurrent()
|
||||
|
||||
RDEPUBBackgroundTrace.log(
|
||||
"CoverageStore",
|
||||
"added segment \(segment.lowerSpineIndex)-\(segment.upperSpineIndex) total=\(segments.count) memory=\(currentMemoryBytes)B"
|
||||
)
|
||||
}
|
||||
|
||||
func findSegment(containing spineIndex: Int) -> RDEPUBBackgroundCoverageSegment? {
|
||||
@@ -138,10 +129,6 @@ final class RDEPUBBackgroundCoverageStore {
|
||||
activeWindowSpineIndices: Set<Int>,
|
||||
protectedSpineIndices: Set<Int>
|
||||
) {
|
||||
RDEPUBBackgroundTrace.log(
|
||||
"CoverageStore",
|
||||
"memory warning: clearing cold segments, current=\(currentMemoryBytes)B"
|
||||
)
|
||||
|
||||
clearColdSegments(
|
||||
activeWindowSpineIndices: activeWindowSpineIndices,
|
||||
@@ -167,11 +154,6 @@ final class RDEPUBBackgroundCoverageStore {
|
||||
segments.removeAll { $0.lowerSpineIndex == segment.lowerSpineIndex }
|
||||
}
|
||||
}
|
||||
|
||||
RDEPUBBackgroundTrace.log(
|
||||
"CoverageStore",
|
||||
"after cleanup: segments=\(segments.count) memory=\(currentMemoryBytes)B"
|
||||
)
|
||||
}
|
||||
|
||||
private func evictIfNeeded(forNewSegment newSegment: RDEPUBBackgroundCoverageSegment) {
|
||||
@@ -201,11 +183,6 @@ final class RDEPUBBackgroundCoverageStore {
|
||||
let evicted = segments.remove(at: oldestIndex)
|
||||
currentMemoryBytes -= evicted.estimatedMemoryBytes
|
||||
lastAccessTime.removeValue(forKey: evicted.lowerSpineIndex)
|
||||
|
||||
RDEPUBBackgroundTrace.log(
|
||||
"CoverageStore",
|
||||
"evicted segment \(evicted.lowerSpineIndex)-\(evicted.upperSpineIndex)"
|
||||
)
|
||||
}
|
||||
|
||||
private func canMerge(_ lhs: RDEPUBBackgroundCoverageSegment, _ rhs: RDEPUBBackgroundCoverageSegment) -> Bool {
|
||||
|
||||
Reference in New Issue
Block a user