mirror of
https://github.com/abh/geodns.git
synced 2026-04-27 11:55:50 +03:00
[GH-ISSUE #46] picker makes garbage #327
Labels
No labels
bug
bug
enhancement
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/geodns#327
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @abh on GitHub (Nov 4, 2013).
Original GitHub issue: https://github.com/abh/geodns/issues/46
From doing some memory profiling it looks like picker.go makes a fair amount of garbage when it copies the list of records so it can manipulate it to not get duplicate results.
(cc @miekg for suggestions).
@miekg commented on GitHub (Nov 4, 2013):
[ Quoting notifications@github.com in "[geodns] picker makes garbage (#46)..." ]
I think this inherit to the setup you choose. The copy is done for every
request, so it might make sense to implement a little cache that looks
up these records for each IP and edns0-subnet pair (ugghh).
Another way is to use a pre-alloced piece of memory that you can reuse
instead of claiming something new each time. There was a blog about this
somewhere, some time ago (that use Golang as a language), but can't
remember the name/site.
grtz Miek