Author Archives:

Google Ads API v20 sunset reminder

Google Ads API v20 will sunset on June 10, 2026. Starting on this date, all v20 API requests will begin to fail. Migrate to a newer version prior to June 10, 2026 to ensure your API access is unaffected.

Here are some resources to help you with the migration:

You can view a list of methods and services your project has recently called using the Google Cloud Console:

  1. Open APIs & Services in the Google Cloud Console.
  2. Click Google Ads API in the table.
  3. On the Metrics subtab, you should see your recent requests plotted on each graph. You can see which methods you've sent requests to in the Methods table. The method name includes a Google Ads API version, a service, and a method name, such as
    google.ads.googleads.v20.services.GoogleAdsService.Mutate.
    
    1. (Optional) Choose the timeframe you want to view for your requests.

If you have any questions or want to discuss this post, please reach out to Google Ads API support or start a discussion on our “Google Advertising and Measurement Community” Discord server.

Chrome for Android Update

 Hello Everyone! We've just released Chrome 148 (148.0.7778.96) for Android to a small percentage of users. It'll become available on Google Play over the next few days. You can find more details about early Stable releases here.

This release includes stability and performance improvements. You can see a full list of the changes in the Git log. If you find a new issue, please let us know by filing a bug.

Krishna Govind
Google Chrome

Chrome Beta for Desktop Update

The Beta channel has been updated to 148.0.7778.96 for Windows, Mac and Linux.

A partial list of changes is available in the Git log. Interested in switching release channels? Find out how. If you find a new issue, please let us know by filing a bug. The community help forum is also a great place to reach out for help or learn about common issues.

Chrome Release Team
Google Chrome

One Map Key, One Lookup

This article was adapted from a Google Tech on the Toilet (TotT) episode. You can download a printer-friendly version of this TotT episode and post it in your office.

By Roman Govsheev

Can you spot the wasted CPU cycles in the map usage?

if employee_id in employees:

  mail_to(employees[employee_id].email_address)

The redundant lookup caused the waste by performing a check (in) and a fetch ([]) as two separate operations when one is sufficient.

Every lookup involves a cost—whether it's computing a hash and scanning buckets or performing an O(log n) traversal. These costs add up quickly. But avoiding them isn’t just “premature optimization”—it’s about writing cleaner, more robust code that stays efficient at scale and prevents potential race conditions.

Instead of paying this cost twice, perform the lookup once and reuse the result:

if (employee := employees.get(employee_id)) is not None:

  mail_to(employee.email_address)

Assigning the search result to a variable avoids a second lookup. This efficiency is native to Go via the “comma ok” idiom (val, ok := map[key]) and C++ using map.find(key), both handling retrieval and existence in a single pass.

The same inefficiency applies when counting or initializing default. Stop checking for presence; instead, use idioms that handle missing keys automatically at the container level:

The redundant way

The efficient way

If key not in counts:

  counts[key] = 1

else:

  counts[key] += 1

counts = defaultdict(int)  # Initializes 0 automatically

# ... other logic ...

counts[key] += 1


Here are some details depending on which language you use:

  • C++: operator[] returns a reference to the value—automatically inserting a default (like 0) if the key is missing—allowing the increment to happen in place.
  • Java: Use map.computeIfAbsent() to perform retrieval and updates in a single call. This is more concise and, on concurrent collections, has the potential to be thread-safe—preventing the “check-then-act” race conditions common with separate contains and put calls.
  • Python: Use collections.defaultdict to handle defaults at the container level, which pushes the logic into optimized C code for better performance and robustness. Note that the += operation (shown later in the above code sample) still involves both a read and a write operation.
  • Go: Use val, ok := map[key] to handle retrieval and existence in one memory access.