Skip to content

Commit

Permalink
Merge pull request #198 from terranodo/issue-197
Browse files Browse the repository at this point in the history
cleaned out unused debug data in makevalid causing significant slowdo…
  • Loading branch information
jj0hns0n authored Nov 28, 2017
2 parents 30dac10 + aca97cb commit 7e7c02b
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions maths/makevalid/plyg/ring.go
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,6 @@ func merge2AdjectRC(c1, c2 RingCol) (col RingCol) {
ptmap := make(map[maths.Pt]int)
ptcounter := make(map[maths.Pt]int)
walkedRings := [][2]int{[2]int{c, r}}
walkedPts := []string{}
for {
etime := time.Now()
elapsed := etime.Sub(stime)
Expand All @@ -601,7 +600,6 @@ func merge2AdjectRC(c1, c2 RingCol) (col RingCol) {
panic("Took too long")
}
if ptcounter[pt] > 5 {
log.Println("Walked Pts:", walkedPts)
log.Println("Col1:", c1.String())
log.Println("Col2:", c2.String())
log.Println("On ring:", ccoli, cri)
Expand All @@ -619,7 +617,6 @@ func merge2AdjectRC(c1, c2 RingCol) (col RingCol) {
panic("Inif loop?")
}

walkedPts = append(walkedPts, fmt.Sprintln(pt))
if idx, ok := ptmap[pt]; ok {
// Need to remove the bubble.
// need to delete the points from the ptmap first.
Expand Down Expand Up @@ -659,15 +656,6 @@ func merge2AdjectRC(c1, c2 RingCol) (col RingCol) {
//log.Println("Marking Ring as seen", ccoli, idx)
seenRings[[2]int{ccoli, idx}] = true
walkedRings = append(walkedRings, [2]int{ccoli, idx})
walkedPts = append(walkedPts,
fmt.Sprintf("Jumping to Col: %v Ring %v, Pt[%v] %v -- because of %v : %v\n",
ccoli,
idx,
ptid,
cols[ccoli].Rings[cri].Points[ptid],
pt, npt,
),
)
cols[ccoli].Rings[cri].BBox()
// don't continue searching.
// Let's check the other column real quick with the new edge.
Expand Down Expand Up @@ -698,15 +686,6 @@ func merge2AdjectRC(c1, c2 RingCol) (col RingCol) {
//log.Println("Marking Ring as seen", ccoli, idx)
seenRings[[2]int{ccoli, idx}] = true
walkedRings = append(walkedRings, [2]int{ccoli, idx})
walkedPts = append(walkedPts,
fmt.Sprintf("Jumping to Col: %v Ring %v, Pt[%v] %v -- because of %v : %v\n",
ccoli,
idx,
ptid,
cols[ccoli].Rings[cri].Points[ptid],
pt, npt,
),
)
cols[ccoli].Rings[cri].BBox()
if nptid >= len(cols[ccoli].Rings[cri].Points) {
nptid = 0
Expand Down

0 comments on commit 7e7c02b

Please sign in to comment.