Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@urso
Copy link

@urso urso commented May 28, 2018

Backport changes from #6346 and #6347, to improve state update
performance on large registry files.

  • make States type easier to find by moving into separate states.go file
  • Add ID->array index, index for faster lookups on update and find
    operations. When updating states in a big registry, the Updates
    converged to quadratic complexity. The index helps in keeping the
    complexity about linear in number of state updates.
  • Do not gc state if there are no 'pending' entries

Backport changes from elastic#6346 and elastic#6347, to improve state update
performance on large registry files.

- make States type easier to find by moving into separate states.go file
- Add ID->array index, index for faster lookups on update and find
  operations. When updating states in a big registry, the Updates
  converged to quadratic complexity. The index helps in keeping the
  complexity about linear in number of state updates.
- Do not gc state if there are no 'pending' entries

// State is used to communicate the reading state of a file
type State struct {
Id string `json:"-"` // local unique id for comparison and indexing states.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

struct field Id should be ID


// State is used to communicate the reading state of a file
type State struct {
Id string `json:"-"` // local unique id for comparison and indexing states.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

struct field Id should be ID

@urso urso added the backport label May 28, 2018
@urso
Copy link
Author

urso commented May 29, 2018

Closing, as backport is not working as stable as I did hope for.

@urso urso closed this May 29, 2018
@urso urso deleted the backport-6346-6347 branch February 19, 2019 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants