Skip to content

Experimental API search exposed through query. #1293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 18, 2018

Conversation

isoos
Copy link
Collaborator

@isoos isoos commented May 15, 2018

@isoos isoos requested a review from jakobr-google May 15, 2018 08:42
@isoos
Copy link
Collaborator Author

isoos commented May 15, 2018

Deploying to staging...

@isoos
Copy link
Collaborator Author

isoos commented May 15, 2018

Looks like the indexing takes a huge toll on the service, and increases the number of 502 responses.

@isoos
Copy link
Collaborator Author

isoos commented May 16, 2018

I've profiled it a bit, and during indexing most of the time is spent with the maintenance of the inverted index, more specifically in the TokenIndex.remove. The number of indexed ID grew 10x, while the number of indexed tokens grew ~3x compared to the sum of the rest we have now.

As the (mostly-updating) indexing is on the CPU-blocking path of the search, I'll seek two path to improve the situation:

  • slowing down the updating path (most of the index is built from the snapshot in a fast way)
  • detecting whether an update is really needed

@isoos
Copy link
Collaborator Author

isoos commented May 16, 2018

@jakobr-google: PTAL. I've deployed this version in staging, you can check it via "PackageAnalyzer" vs "PackageAnalyzer !!api". HTTP 502 errors are now gone, memory use is still under 1G.

Copy link
Contributor

@jakobr-google jakobr-google left a comment

Choose a reason for hiding this comment

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

LGTM

@isoos isoos merged commit aac20fb into dart-lang:master May 18, 2018
@isoos isoos deleted the search_exp branch May 18, 2018 13:24
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.

3 participants