Connect with us


9 Social Media Trends You Need to Know to Plan Your 2022 Strategy



It’s that time again. Social media managers everywhere are blinking our eyes and poking our heads out from behind our screens to take the lay of the land. We’ve got strategies to plan, and we need to know: which social media trends are going to change the game in 2022?

Is TikTok going to overtake Instagram? Is organic engagement any better? Is it necessary to host a live audio chat once a week?

It can be tough working in an industry that morphs faster than a Power Ranger. But, don’t worry, we’re here to save you a bunch of late nights because we have answers.

We looked at the 5 key trends outlined in Hootsuite’s global Social Trends 2022 report, along with data from our survey of over 18,000 marketers to bring you this list of 9 social media trends that will dominate the industry in 2022. And probably even change the way you do your job.

Download the full Social Trends report to get an in-depth analysis of the data you need to prioritize and plan your social strategy in 2022.

free widgets for website

Instagram has held the #1 spot in most social marketers’ hearts for the past few years. It was growing the fastest, had the highest returns on investment (depending on your industry), and (bonus) was pretty fun to hang out on. But that’s changing now.

TikTok surpassed the 1 billion user mark in September 2021. That made it the 7th most popular social network in the world.

If you exclude messaging networks, TikTok is the 4th most popular social media network after Instagram.

Chart: the world's most used social media platforms

Why is this a big deal? Well, in January 2021, it only had 689 million users. That’s a 45% increase in less than a year.

And this comes after its largest growth spurt of all: a global user base increase of 1,157% between 2018 and 2020.

free widgets for website

To put this into perspective, Instagram’s monthly active users grew at a rate of 6% in 2020.

Even more interesting? Google Search Trends shows that TikTok completely dominates Instagram’s short-form video content.

Over the last year, search demand for TikTok has grown by 173%. But search demand for Instagram Reels has only grown by 22%. And it has decreased by 33% for Stories.

But despite TikTok’s rapid growth, most businesses are hesitant to invest in the network. Take the results from Hootsuite’s Social Media Trends report.

Chart: Do you plan on increasing or maintaining or decreasing your investment in the following social media networks?

Only 35% of respondents said they planned on increasing their investment in TikTok in the next year. Most businesses continue to place big bets on reliable networks like Instagram and Facebook.

free widgets for website

But that’s not the whole story. When asked which social platforms they considered most effective for reaching their business goals, 24% said TikTok. This is a 700% increase over 2020.

Social media trends chart: Which social media platforms do you consider most effective for reaching your business goals?

TikTok introduced several helpful business tools in 2020 and 2021, including business profiles, ads, and a creator marketplace. This could be why businesses are feeling more optimistic about it this year.

To-Do List: If brands aren’t flocking to TikTok yet, they will be soon. We recommend being at the front of the wave rather than behind it.

  • Grab an account handle for your brand
  • Explore TikTok so you can start feeling fluent on the platform and find some ideas
  • Sketch out the basics of your TikTok marketing strategy

2. You will start spending big ad dollars on smaller networks

Of all the social media trends on this list, this one is perhaps the most surprising.

New research shows that consumers may be more receptive to advertising on smaller channels like TikTok, Snapchat, and Pinterest than the bigger social networks.

  • A study by Kantar, commissioned by TikTok, found that consumers ranked TikTok ads as more inspiring and enjoyable than ads on other platforms.
  • A Nielson study commissioned by Snapchat found that ads on Snapchat had more reach than TV ads and led to greater awareness and purchase intent.
  • A Pinterest Business study showed that ads on Pinterest had higher ROI and cheaper conversion rates than ads on other social networks.

Google Search Trends also show increasing search demand over the last two years for ads on these networks. TikTok is leading the charge.

This chart shows that rumors of good results are spreading. And curiosity about advertising on the smaller networks goes beyond self-funded studies.

free widgets for website

Our hypothesis? The smaller networks aren’t as saturated with ads as Facebook and Instagram, so users may suffer less from ads fatigue.

Many social pros also had to diversify their ads strategy in early 2021 in response to the Apple iOS 14 update. This was when Apple announced an “opt in to ads tracking” option for all Apple users, blocking Facebook’s ability to target a vast chunk of its audience.

Most importantly though, TikTok, Pinterest and Snapchat all encourage advertisers to make their ads “fit in” with organic content that is already being posted by regular users.

The result is ads that are more entertaining and less disruptive, increasing conversions and all-round good vibes for businesses.

French beauty brand MAKE UP FOREVER ran an in-feed TikTok ad as part of a larger brand awareness campaign. It features a creator testing and reviewing a new foundation as they would on their own channel.

free widgets for website

The campaign generated more than 11 million impressions and 10 million video views for the brand across France.

To-Do List:

  • Take a closer look at your engagement across all platforms. Have you been underestimating Pinterest users? Neglecting the potential of your Snapchat audience?
  • Study the content people post on that network. See if you can improve your brand’s tone to fit in with the vibe there.
  • Experiment with creating ads on that network. Or test a new network, especially if you’ve discounted it as too much effort for organic content in the past.
See also  Instagram's harm to teens creates rare bipartisan momentum in Congress - USA Today

Before the pandemic, social commerce was a flashy opportunity for the most innovative businesses (mattress disruptors, eyeglass disruptors—basically you had to call yourself a disruptor before you’d let your customers shop on social).

But increased social media consumption combined with stay-at-home mandates created the perfect conditions for a social shopping explosion. Which is not going away.

eMarketer predicts social commerce will be an $80 billion industry by 2025. It’s riding the coattails of equally massive e-commerce growth (an increase of 18% in 2020 alone).

Social Media Trends Chart: US Retail Social Commerce Sales, 2019 - 2025

81% of shoppers were already using social media to discover new brands and research products before the pandemic. Many businesses have figured out that letting these users checkout in the same app just makes sense.

free widgets for website

After all, navigating to a website is an extra step, which is an extra potential leak in your conversion funnel. Especially on mobile, where cart abandonment rates are high.

Most social networks have in-app shopping solutions now, including live video, and are working to provide new features to meet rising demand. But Instagram, Facebook, and Pinterest are the most popular. And TikTok, Twitter, and YouTube aren’t far behind.

Instagram Explore page
Instagram added a “Shop” tab to the Explore page in 2020

To-Do List

Social commerce likely won’t replace e-commerce soon. But, depending on your business, you shouldn’t be designing a retail experience without thinking about it.

  • If you sell products to people, set up a Facebook Shop and/or an Instagram Shop. Or, test out Product Pins on Pinterest.
  • There’s some design flexibility in these shops, so make the customer experience as visually seamless with your brand as you can.
  • Don’t worry about getting your whole inventory up. Focus on curating the items you think your Instagram followers will like best.
  • Experiment with shoppable posts, or even ads! This will allow customers to see your products in context—and then place an order in just a few taps.

4. No one will want to talk to your brand on the phone

Between lockdowns, halting global supply chains, and labor shortages, consumers have had more urgent questions for businesses than ever before. And they’ve discovered they can get answers to those questions more conveniently using social media.

In a Nielsen survey commissioned by Facebook, 64% of people said they would prefer to message rather than call a business. And ​​according to Gartner, 60% of all customer service requests will be managed via digital channels by 2023.

Despite the rise in demand, many organizations aren’t ready to deliver effective customer support over social media yet.

free widgets for website

Hootsuite’s 2022 Customer Care Survey shows that 71% of organizations have either not started investing in social customer care yet, or they don’t plan to invest at all.

Social Media Trends Chart: Is social customer care an area your organization will be investing in more in the future?

But our more recent Social Media Trends survey data suggests that the tide may be turning. 59% of respondents agreed that social customer care has increased in value for their organization.

To-Do List

  • Start thinking about a social media customer service strategy.
  • Create network-specific response templates for frequently asked questions.
  • If you haven’t already, try using a chatbot to improve your response time.
  • Merge your customer service conversations in one tool. (Naturally, we suggest Sparkcentral or Hootsuite Inbox.)
  • Train your social marketing team in customer support best practices. Better yet, hire dedicated customer service agents for your social channels.

5. Long-form video is a bust, except on YouTube

According to video hosting software company Vidyard, 60% of all videos published on the internet in 2020 were under 2 minutes long.

Graph: Video length distribution across the internet
Source: Vidyard

This stat puts video length on social media platforms into perspective.

Two years ago, with the advent of IGTV and Facebook Watch (not to mention the supposed demise of Snapchat), there was a moment when we all thought long-form video was the future.

YouTube, known for its long-form educational videos, was rewarding videos that passed the 10-minute mark. And Facebook wanted to compete in the same arena.

free widgets for website

Businesses rushed to make “tv series” for their social platforms. Will Smith even narrated an IGTV show for National Geographic. It seemed like Facebook might not only be taking on YouTube, but cable TV networks as well.

But then TikTok arrived in North America. In response, Instagram launched Reels in late 2020, and the rest is history.

Fast forward to fall 2021.

Instagram has deprecated IGTV. No one talks about Facebook Watch anymore. And even YouTube, the last bastion of long-form video on social media, has introduced a new format. You guessed it: YouTube Shorts.

The success of Reels and TikTok follows the success of Stories (another short-form video format), which saw rapid user uptake from 2018 to 2020.

free widgets for website

Unfortunately, Facebook hasn’t updated the 500 million user count for Stories since the release of Reels in 2020, so we can’t really tell if it has grown. But attempts to copy the disappearing short-form video format on Twitter and LinkedIn failed in 2021. RIP Fleets and LinkedIn Stories.

if you see a Fleet no you didn’t

— Twitter (@Twitter) August 3, 2021

This suggests that social media users won’t watch just any short-form videos. They have to be entertaining and engaging too. Also, perhaps disappearing content isn’t as big a draw as it used to be.

Whatever the reason, Hootsuite’s 2022 Social Media Trends survey shows that businesses prefer short-form video too.

Social Media Trends Chart: Does your company engage in any of the following activities to sell products or services?

Nearly 40% of respondents said that they use short-form video to sell products/services.

free widgets for website

To-Do List:

  • If your goal is to reach new followers, experiment with TikTok videos.
  • If your goal is to re-engage your existing Instagram audience, experiment with Reels.
  • If you have success with short-form videos on one platform, try it on others. And take note of the results. As always, you’ll want to translate videos for each channel. No TikTok watermarks on Reels, please!

6. You will outsource (at least some of) your engagement tactics to a Creator

The creator economy has been around for about a decade. But it boomed during the pandemic as people looked for ways to diversify their income (due to unemployment, or a sudden influx of spare time, or both).

But we’re not just talking about millionaire YouTube stars. It’s now considered common for regular folks to monetize their hobbies, create a second income stream, or find freelance work through social media too.

Hence the rise of the term “Creator.”

“Creator” encompasses both professional influencer marketers and amateur content creators — basically anyone who writes, edits, designs, and films content to publish on social media with an entrepreneurial motivation.

As of 2021, 50 million people consider themselves to be creators on social networks. And businesses are set to spend $15 billion on influencer marketing by 2022.

free widgets for website

In the U.S. alone, 72.5% of marketers are projected to make use of influencer marketing by 2022.

Graph: Share of U.S. Marketers using social media and influencer marketing, 2019 - 2022
Source: eMarketer

Social networks are both driving and responding to this boom by adding many new native monetization tools, such as:

  • TikTok’s Creator Marketplace
  • Instagram’s Collabs
  • Instagram’s Branded Content Ads
  • Facebook’s Brand Collabs Manager
  • YouTube Brand Connect
  • Twitter’s paid Super Follows

These tools are all geared to get content creators paid, so they can keep adding value for brands and users on their chosen platforms.

Plus, they help the networks hang on to their slice of that $15 billion pie. That is until one of the thousands of third-party “creator monetization” apps that have sprung up in the last few years finally cracks the code.

To-Do List: Whatever your niche (plant fanatics, goth Harry Potter fans, ASMR receptionists, etc.), there is a creator with an already established fan base waiting to partner with you. And they’ll do a better job of creating authentic, long-term customer relationships than any brand account could ever hope to!

  • Define the audience you want to reach (and which platform they’re on).
  • Browse creator marketplaces to make a shortlist of people who have clout with that audience.
  • Get ready to pay fair rates. Even the most micro of creators know their worth and won’t be willing to work for free.

7. You need to learn paid advertising (even if you don’t do ads yet)

Honestly, this social media trend has been around for a few years. But it’s still worth mentioning, especially given what we found in Hootsuite’s 2022 Social Media Trends survey.

43% of respondents said “the decline of organic reach and the need to increase paid advertising budgets” was their biggest challenge on social media. This is second only to consistently coming up with ideas for content.

Social Media Trends Chart: What are your biggest challenges on social media?

But that was for respondents overall. Small to medium-sized businesses (SMBs) listed the decline of organic reach as their #1 challenge.

free widgets for website

This makes sense. The decline of organic reach has been well-documented for years, especially on Facebook and Instagram. And most SMBs have limited funds to put towards “pay-to-play” tactics.

The pandemic caused some ups and downs for social advertising. Businesses reduced their spending on ads. And the ones that continued to spend complained about low returns on over-saturated networks.

Plus, Apple allowed users to opt out of Facebook tracking. This caused Facebook advertisers to reinvent how they did their ad targeting.

But the fact remains that the average organic reach for a Facebook post is 5.2%.

That means only 5% of your followers may ever see your posts if you don’t put any paid budget behind them.

free widgets for website

Sure, you can expand your social media strategy to other networks where it’s still possible to go viral without spending a dime. (*Ahem* TikTok.) But chances are you’re not going to leave the audiences you worked so hard to grow.

No matter what your budget, someone on your social marketing team is going to have to at least learn how to boost. And everyone is going to have to learn the basics of audience targeting.

To-Do List:

  • Keep using organic social media content to increase brand awareness, deliver customer service, and encourage audience engagement, charming people along the buying journey. Refer to the handy Venn diagram below for more information.
  • Experiment with promoting your top posts to reach new potential customers.
  • If you’re ready to level up your ads game, consider investing in a solution like Hootsuite Social Advertising. It allows you to publish ads to Facebook, Instagram and LinkedIn and track their performance in the same dashboard.

Request a Demo

​​ Venn diagram: Benefits of Organic vs. Paid social media

During the COVID-19 pandemic, many businesses jumped on board the social listening train for the first time. They liked being able to respond in real-time to questions and conversations with their customers during a health crisis.

But as the pandemic progressed (and was buffeted by ongoing political upheaval, labor shortages, and increased resentment towards corporations), even more businesses learned that social listening could help them understand their customers’ changing preferences and avoid PR mishaps.

free widgets for website

Social Media Trends Chart: Over the past 12 months, social listening has increased in value for my organization

This trend is backed by data from Hootsuite’s 2022 Social Media Trends survey. Most respondents said that they either somewhat or strongly agree that social listening has increased in value for their organization over the past 12 months.

We also see that Google search demand for keywords like “social listening” and “social listening tools” is up 22% year-over-year. This means that more people are on the hunt to either find out what social listening is or buy a tool for their business.

Chart: Year-over-year growth in Google search volume for social listening related keywords

To-Do List

  • Set up three search streams in your preferred social media management tool (if you don’t have one yet, try Hootsuite for free for 30 days) for the following:
      • Your brand mentions, branded hashtags, products, and spokespeople
      • Your competitors’ brand mentions, branded hashtags, products, and spokespeople
      • Keywords and hashtags important to your industry as a whole
  • Watch our super-informative intro to social listening video:

  • Make sure that the people who make decisions have access to what you learn. Whether you’re running a one-woman flower shop or have a team of two hundred marketers, social listening will surface issues and opportunities that can affect the whole business.

Try Streams in Hootsuite

Clubhouse launched in April 2020 but grew steeply in popularity in early 2021.

Graph: Monthly installs of Clubhouse Worldwide, Sept. 14, 2020 - Mar. 15, 2021

Twitter launched its social audio platform, Spaces, quickly after. And Facebook is also reportedly trying to enter the ephemeral live audio format.

free widgets for website

These events had many social marketing teams, including Hootsuite’s, scrambling to decide whether it was worth investing in a social audio strategy. And as our 2022 Social Media Trends survey shows, the majority of businesses seem to think it is worth it.

Social Media Trends Chart: Are you planning to invest in audio-only content in the next 12 months?

When asked specifically how they were planning to invest, results were fairly mixed across the board. But the most popular option was “hosting/leading audio live streams as thought leaders.”

(Side note: props to everyone who’s been assigned the job of creating a company podcast. Blink twice if you want us to send help.)

Social Media Trends Chart: How are you planning to invest in audio-only content?

Let’s break down the data even further.

Our survey found that it was most often VPs and mid- to large-size companies who planned to invest in social audio and thought leadership, as well as companies that were already very confident about proving social media’s return on investment (i.e., companies that use highly sophisticated social marketing tactics).

free widgets for website

This makes sense. Thought leadership is seen as a great opportunity for social audio content because it enables one or two people to speak to a large crowd. For those who have the boldness and the budget, it’s a big opportunity to build trust in your brand and directly connect with potential customers.

That said, because of the skill and time involved, social audio is not a particularly cheap form of content marketing. This is one of the reasons we predict small businesses will be slower to adopt it. You’ve got to have the cash to make an investment upfront on a format that hasn’t proved ROI for anyone yet.

Lastly, Clubhouse has stated that ads won’t ever be a part of its business model.

This is either a pro or a con for businesses, depending on how you look at it. Either way, the lack of ads means integrating your brand into Clubhouse will take some imagination.

And the path to ROI will be a long and winding one, which may often include redirecting listeners to your other social media channels.

free widgets for website

To-Do List:

  • You don’t have to choose one particular social audio platform over another. But you should start thinking about how your business can take advantage of social audio in general, now.
  • Once you’ve got an idea of the value you could bring to listeners, start thinking about specific platforms. For example, try using Spaces to engage your existing community on Twitter. Try Clubhouse to connect with new followers.
  • Tap the thought leaders (hopefully good, charismatic humans with plenty of improv experience) in your company to host a talk on behalf of your brand. And make sure you hire a pro moderator who can help minimize the risk of trolls and unwelcome questions.
  • If no one fits the thought leader bill in your company, consider partnering with an influencer who matches your brand values to host a talk on your behalf.

That’s it! These are the 9 social media trends we think you need to know to stay on top of your game in 2022. Which ones did you see coming? And which ones surprised you? Leave us a comment below to let us know.

You’ve read the social media trends. Now let Hootsuite help you stay ahead of them.

Get a full suite of tools to help you manage every aspect of your brand’s social media presence.

From a single dashboard you can easily:

  • Create, edit and schedule posts to every network
  • Find out what your best times to post are based on your unique, historical data
  • Track relevant keywords, topics, and accounts
  • Respond to comments and direct messages with a universal inbox
  • Get easy-to-understand performance reports to help improve your strategy as needed

Try Hootsuite for Free

With files from Paige Cooper.

Easily manage all your social media in one place and save time with Hootsuite.

free widgets for website

Try it for Free


Resources for Completing App Store Data Practice Questionnaires for Apps That Include the Facebook or Audience Network SDK





Resources for Completing App Store Data Practice Questionnaires for Apps That Include the Facebook or Audience Network SDK

First seen at

See also  Introducing Login Connect with Messenger
Continue Reading


Resources for Completing App Store Data Practice Questionnaires for Apps That Include the Facebook or Audience Network SDK





Updated July 18: Developers and advertising partners may be required to share information on their app’s privacy practices in third party app stores, such as Google Play and the Apple App Store, including the functionality of SDKs provided by Meta. To help make it easier for you to complete these requirements, we have consolidated information that explains our data collection practices for the Facebook and Audience Network SDKs.

Facebook SDK

To provide functionality within the Facebook SDK, we may receive and process certain contact, location, identifier, and device information associated with Facebook users and their use of your application. The information we receive depends on what SDK features 3rd party applications use and we have structured the document below according to these features.

App Ads, Facebook Analytics, & App Events

Facebook App Events allow you to measure the performance of your app using Facebook Analytics, measure conversions associated with Facebook ads, and build audiences to acquire new users as well as re-engage existing users. There are a number of different ways your app can use app events to keep track of when people take specific actions such as installing your app or completing a purchase.

With Facebook SDK, there are app events that are automatically logged (app installs, app launches, and in-app purchases) and collected for Facebook Analytics unless you disable automatic event logging. Developers determine what events to send to Facebook from a list of standard events, or via a custom event.

When developers send Facebook custom events, these events could include data types outside of standard events. Developers control sending these events to Facebook either directly via application code or in Events Manager for codeless app events. Developers can review their code and Events Manager to determine which data types they are sending to Facebook. It’s the developer’s responsibility to ensure this is reflected in their application’s privacy policy.

free widgets for website

Advanced Matching

Developers may also send us additional user contact information in code, or via the Events Manager. Advanced matching functionality may use the following data, if sent:

  • email address, name, phone number, physical address (city, state or province, zip or postal code and country), gender, and date of birth.
See also  The power of TikTok cancel culture

Facebook Login

There are two scenarios for applications that use Facebook Login via the Facebook SDK: Authenticated Sign Up or Sign In, and User Data Access via Permissions. For authentication, a unique, app-specific identifier tied to a user’s Facebook Account enables the user to sign in to your app. For Data Access, a user must explicitly grant your app permission to access data.

Note: Since Facebook Login is part of the Facebook SDK, we may collect other information referenced here when you use Facebook Login, depending on your settings.

Device Information

We may also receive and process the following information if your app is integrated with the Facebook SDK:

  • Device identifiers;
  • Device attributes, such as device model and screen dimensions, CPU core, storage size, SDK version, OS and app versions, and app package name; and
  • Networking information, such as the name of the mobile operator or ISP, language, time zone, and IP address.

Audience Network SDK

We may receive and process the following information when you use the Audience Network SDK to integrate Audience Network ads in your app:

  • Device identifiers;
  • Device attributes, such as device model and screen dimensions, operating system, mediation platform and SDK versions; and
  • Ad performance information, such as impressions, clicks, placement, and viewability.

First seen at

Continue Reading


Enabling Faster Python Authoring With Wasabi





This article was written by Omer Dunay, Kun Jiang, Nachi Nagappan, Matt Bridges and Karim Nakad.


At Meta, Python is one of the most used programming languages in terms of both lines of code and number of users. Everyday, we have thousands of developers working with Python to launch new features, fix bugs and develop the most sophisticated machine learning models. As such, it is important to ensure that our Python developers are productive and efficient by giving them state-of-the-art tools.

Introducing Wasabi

Today we introduce Wasabi, a Python language service that implements the language server protocol (LSP) and is designed to help our developers use Python easier and faster. Wasabi assists our developers to write Python code with a series of advanced features, including:

  • Lints and diagnostics: These are available as the user types.
  • Auto import quick fix: This is available for undefined-variable lint.
  • Global symbols autocomplete: When a user types a prefix, all symbols (e.g. function names, class names) that are defined in other files and start with that prefix will appear in the autocomplete suggestion automatically.
  • Organize Imports + Remove unused: A quick fix that removes all unused imports and reformats the import section according to pep8 rules. This feature is powered by other tools that are built inside Meta such as libCST that helps with safe code refactoring.
  • Python snippets: Snippet suggestions are available as the user types for common code patterns.

Additionally, Wasabi is a surface-agnostic service that can be deployed into multiple code repositories and various development environments (e.g., VSCode, Bento Notebook). Since its debut, Wasabi has been adopted by tens of thousands of Python users at Meta across Facebook, Instagram, Infrastructure teams and many more.

Figure 1: Example for global symbols autocomplete, one of Wasabi’s features

Language Services at Meta Scale

A major design requirement for language services is low latency / user responsiveness. Autocomplete suggestions, lints and quickFixes should appear to the developer immediately as they type.

free widgets for website

At Meta, code is organized in a monorepo, meaning that developers have access to all python files as they develop. This approach has major advantages for the developer workflow including better discoverability, transparency, easier to share libraries and increased collaboration between teams. It also introduces unique challenges for building developer tools such as language services that need to handle hundreds of thousands of files.

See also  Twitter Sends Civil Subpoenas to Elon Musk’s Tech Allies as Part of Lawsuit

The scaling problem is one of the reasons that we tried to avoid using off-the-shelf language services available in the industry (e.g., pyright, jedi) to perform those operations. Most of those tools were built in the mindset of a relatively small to medium workspace of projects, maybe with the assumptions of thousands of files for large projects for operations that require o(repo) information.

For example, consider the “auto import” quick fix for undefined variables. In order to suggest all available symbols the language server needs to read all source files, the quick fix parses them and keeps an in-memory cache of all parsed symbols in order to respond to requests.

While this may scale to be performed in a single process on the development machine for small-medium repositories, this approach doesn’t scale in the monorepo use case. Reading and parsing hundreds of thousands of files can take many minutes, which means slow startup times and frustrated developers. Moving to an in-memory cache might help latency, but also may not fit in a single machine’s memory.

For example, assume an average python file takes roughly 10ms to be parsed and to extract symbols in a standard error recoverable parser. This means that on 1000 files it can take 10 seconds to initialize which is a fairly reasonable startup time. Running it on 1M files would take 166 minutes which is obviously a too lengthy startup time.

free widgets for website

How Wasabi Works

Offline + Online Processing:

In order to support low latency in Meta scale repositories, Wasabi is powered by two phases of parsing, background processing (offline) done by an external indexers, and local processing of locally changed “dirty files” (online):

  1. A background process indexes all committed source files and maintains the parsed symbols in a special database (glean) that is designed for storing code symbol information.
  2. Wasabi, which is a local process running on the user machine, calculates the delta between the base revision, stack of diffs and uncommitted changes that the user currently has, and extracts symbols only out of those “dirty” files. Since this set of “dirty” files is relatively small, the operation is performed very fast.
  3. Upon an LSP request such as auto import, Wasabi parses the abstract syntax tree (AST) of the file, then based on the context of the cursor, creates a query for both glean and local changes symbols, merges the results and returns it to the user.
See also  Government Issued 105 Blocking Orders to Social Media Firms Under New IT Rules

As a result, all Wasabi features are low latency and available to the user seamlessly as they type.

Note: Wasabi currently doesn’t handle the potential delta between the revision that glean indexed (happens once every few hours) and the locally base revision that the user currently has. We plan on adding that in the future.

Figure 2: Wasabi’s high level architecture

Ranking the Results

In some cases, due to the scale of the repository, there may be many valid suggestions in the set of results. For example, consider “auto import” suggestions for the “utils” symbol. There may be many modules that define a class named “utils” across the repository, therefore we invest in ranking the results to ensure that users see the most relevant suggestions on the top.

free widgets for website

For example, auto import ranking is done by taking into account:

  • Locality:
    • The distance of the suggested module directory path from the directory paths of modules that are already imported in this file.
    • The distance of the suggested module directory path from the current directory path of the local file.
    • Whether the file has been locally changed (“dirty” files are ranked higher).
  • Usage: The number of occurrences the import statement was used by other files in the repository.

To measure our success, we measured the index in the suggestion list of an accepted suggestion and noted that in almost all cases the accepted suggestion was ranked in one of top 3 suggestions.

Positive feedbacks from developers

After launching Wasabi to several pilot runs inside Meta, we have received numerous positive feedbacks from our developers. Here is one example of the quote from a software engineer at Instagram:

“I’ve been using Wasabi for a couple months now, it’s been a boon to my productivity! Working in Instagram Server, especially on larger files, warnings from pyre are fairly slow. With Wasabi, they’re lightning fast 😃!”

“I use features like spelling errors and auto import several times an hour. This probably makes my development workflow 10% faster on average (rough guess, might be more, definitely not less), a pretty huge improvement!”

As noted above, Wasabi has made a meaningful change to keep our developers productive and make them feel delightful.

free widgets for website

The metric to measure authoring velocity

In order to quantitatively understand how much value Wasabi has delivered to our Python developers, we have considered a number of metrics to measure its impact. Ultimately, we landed on a metric that we call ‘Authoring Velocity’ to measure how fast developers write code. In essence, Authoring Velocity is the inverse function of the time taken on a specific diff (a collection of code changes) during the authoring stage. The authoring stage starts from the timestamp when a developer checks out from the source control repo to the timestamp when the diff is created. We have also normalized it against the number of lines of code changed in the diff, as a proxy for diff size, to offset any possible variance. The greater the value for ‘Authoring Velocity,’ the faster we think developers write their code.

See also  Should Your Business Be On Pinterest?

Figure 3: Authoring Velocity Metric Formula

The result

With the metric defined, we ran an experiment to measure the difference that Wasabi brings to our developers. Specifically, we selected ~700 developers who had never used Wasabi before, and then randomly put them into two independent groups at a 50:50 split ratio. For these developers in the test group, they were enabled with Wasabi when they wrote in Python, whereas there was no change for those in the control group. For both groups, we compare the changes in relative metric values before and after the Wasabi enablement. From our results, we find that for developers in the test group, the median value of authoring velocity has increased by 20% after they started using Wasabi. Meanwhile, we don’t see any significant change in the control group before and after, which is expected.

Figure 4: Authoring Velocity measurements for control and test groups, before and after Wasabi was rolled out to the test group.


With Python’s unprecedented growth, it is an exciting time to be working in the area to make it better and handy to use. Together with its advanced features, Wasabi has successfully improved developers’ productivity at Meta, allowing them to write Python faster and easier with a positive developer experience. We hope that our prototype and findings can benefit more people in the broader Python community.

free widgets for website

To learn more about Meta Open Source, visit our open source site, subscribe to our YouTube channel, or follow us on Twitter, Facebook and LinkedIn.

First seen at

Continue Reading