From bbefdfd400817247cd4e53886a1ac0696b35672c Mon Sep 17 00:00:00 2001 From: dangered wolf Date: Thu, 2 Nov 2023 23:30:49 -0400 Subject: [PATCH] Improve TweetDetail query performance --- src/experiments.ts | 2 +- src/providers/twitter/conversation.ts | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/experiments.ts b/src/experiments.ts index 39640bc..b4415ba 100644 --- a/src/experiments.ts +++ b/src/experiments.ts @@ -24,7 +24,7 @@ const Experiments: { [key in Experiment]: ExperimentConfig } = { [Experiment.TWEET_DETAIL_API]: { name: 'Tweet detail API', description: 'Use Tweet Detail API (where available with elongator)', - percentage: 0.75 + percentage: 0.4 } }; diff --git a/src/providers/twitter/conversation.ts b/src/providers/twitter/conversation.ts index 20c0e3e..1911daa 100644 --- a/src/providers/twitter/conversation.ts +++ b/src/providers/twitter/conversation.ts @@ -20,8 +20,8 @@ export const fetchTweetDetail = async ( referrer: 'home', with_rux_injections: false, includePromotedContent: false, - withCommunity: true, - withBirdwatchNotes: true, + withCommunity: false, + withBirdwatchNotes: false, withQuickPromoteEligibilityTweetFields: false, withVoice: false, withV2Timeline: true, @@ -29,10 +29,11 @@ export const fetchTweetDetail = async ( }) )}&features=${encodeURIComponent( JSON.stringify({ - responsive_web_graphql_exclude_directive_enabled: true, + c9s_tweet_anatomy_moderator_badge_enabled: false, + responsive_web_graphql_exclude_directive_enabled: false, verified_phone_label_enabled: false, - responsive_web_home_pinned_timelines_enabled: true, - creator_subscriptions_tweet_preview_api_enabled: true, + responsive_web_home_pinned_timelines_enabled: false, + creator_subscriptions_tweet_preview_api_enabled: false, responsive_web_graphql_timeline_navigation_enabled: true, responsive_web_graphql_skip_user_profile_image_extensions_enabled: false, tweetypie_unmention_optimization_enabled: true, @@ -43,7 +44,7 @@ export const fetchTweetDetail = async ( responsive_web_twitter_article_tweet_consumption_enabled: false, tweet_awards_web_tipping_enabled: false, freedom_of_speech_not_reach_fetch_enabled: true, - standardized_nudges_misinfo: true, + standardized_nudges_misinfo: false, tweet_with_visibility_results_prefer_gql_limited_actions_policy_enabled: false, longform_notetweets_rich_text_read_enabled: true, longform_notetweets_inline_media_enabled: true,