Skip to content

used extremely large amount of memory #2

Description

@siff-duke

Just comparing 2 solaris pkginfo output used about 1.5Gb of memory (attached).

	edits := myers.ComputeEdits(span.URIFromPath(""), PrevContent, Content)
	unifiedPatch := gotextdiff.ToUnified("src", "dst", PrevContent, edits)
	var DiffContent = fmt.Sprint(unifiedPatch)

	fmt.Printf("!!!! len(DiffContent):%+v\n", len(DiffContent))
/usr/bin/time -v go run scratch.go
!!!! len(DiffContent):1152378
	Command being timed: "go run scratch.go"
	User time (seconds): 2.07
	System time (seconds): 2.51
	Percent of CPU this job got: 102%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 0:04.46
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 15095320
	Average resident set size (kbytes): 0
	Major (requiring I/O) page faults: 5
	Minor (reclaiming a frame) page faults: 3793204
	Voluntary context switches: 3058
	Involuntary context switches: 434
	Swaps: 0
	File system inputs: 0
	File system outputs: 5640
	Socket messages sent: 0
	Socket messages received: 0
	Signals delivered: 0
	Page size (bytes): 4096
	Exit status: 0

solaris-sw-pkginfo.txt
prev-pkginfo.txt

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions