Skip to content

Speed up 8 times #22

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 2 commits into from
Oct 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 1 addition & 45 deletions leetcode_anki/helpers/leetcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,67 +164,23 @@ def _get_problems_data_page(
skip: $skip
filters: $filters
) {
total: totalNum
questions: data {
questionId
questionFrontendId
boundTopicId
title
titleSlug
categoryTitle
frequency
freqBar
content
translatedTitle
isPaidOnly
difficulty
likes
dislikes
isLiked
isFavor
similarQuestions
contributors {
username
profileUrl
avatarUrl
__typename
}
langToValidPlayground
topicTags {
name
slug
translatedName
__typename
}
companyTagStats
codeSnippets {
lang
langSlug
code
__typename
}
stats
acRate
codeDefinition
hints
solution {
id
canSeeDetail
__typename
}
hasSolution
hasVideoSolution
status
sampleTestCase
enableRunCode
metaData
translatedContent
judgerAvailable
judgeType
mysqlSchemas
enableTestMode
envInfo
__typename
}
}
}
Expand Down Expand Up @@ -258,7 +214,7 @@ def _get_problems_data(
start = self._start
stop = min(self._stop, problem_count)

page_size = min(50, stop - start + 1)
page_size = min(3000, stop - start + 1)

problems: List[
leetcode.models.graphql_question_detail.GraphqlQuestionDetail
Expand Down