Connect with us

Microsoft

Memory tooling improvements in DevTools for Retainers

Any sufficiently large web application will probably reach the point where it uses more memory than expected. At that point, a developer might start recording memory heap snapshots in DevTools to investigate what objects are contained in memory. For any object listed in the snapshot, DevTools shows, in the Retainers pane, what other objects cause…

Published

on

Any sufficiently large web application will probably reach the point where it uses more memory than expected. At that point, a developer might start recording memory heap snapshots in DevTools to investigate what objects are contained in memory. For any object listed in the snapshot, DevTools shows, in the Retainers pane, what other objects cause it to remain in memory. Any object with no retainers can be discarded by the browser’s garbage collector, which reduces memory usage.

However, the Retainers pane is only useful if it works correctly. Over the past several months, we have received several excellent bug reports from Microsoft Teams engineers describing cases where DevTools showed retainers that simply made no sense, and there was no way that a web application developer could take any action to remove those retainers. Thank you to everyone who brought these issues to our attention. We’ve fixed those bugs (details below), but of course there may be others, so if you see something that seems wrong, please speak up! The easiest way to get in touch is the feedback button in the devtools:

Before we get started, note that although several things below refer to Microsoft Edge, the problems we fixed were in the browser’s JavaScript engine’s code (V8). This code is shared with Chrome, Electron, Node, and others, so all those products will benefit from the fixes.

Swimming in false retainer paths

Suppose you were working on the Microsoft Edge new-tab page (edge://newtab) and wanted to know why the function named observe() is being kept alive. You would hit F12 to open DevTools, navigate to the Memory tab, and select the relevant object in the top pane. In Microsoft Edge version 94, you would see four retainers for that function:

The shortest path goes through a FeedbackVector, an internal data type which collects data about what functions have been called by another function. Expanding that path a little more, you would see that the FeedbackVector is owned by another function, HTMLElement.attachShadow():

So, there’s this function which retains some internal V8 goo that you have no control over which, in turn, retains the original function observe(). How can you possibly break that link, since it’s all V8 internals?

You can’t, which means there’s a bug. Either V8 is leaking memory, or the Retainers pane is incorrect, and both are serious high-priority issues for us. In this case, the problem was that Microsoft Edge showed incorrect retainers. We have fixed this issue in Microsoft Edge 99. Here is the correct answer list of retainers:

Because the Retainers tree is both deep and wide on large apps, the number of false paths completely blocked many memory usage investigations. This problem was so pervasive that our friends at Microsoft Teams have been using a workaround which captures additional information during V8’s garbage collection phase and highlights a single retainer path which is actually known to be true.

Keeping it fixed

It’s very important that developers can trust DevTools, so we are working on an automated solution to prevent regressions that introduce new false retainer paths. Based on the insight from Microsoft Teams that the heap snapshot needs to match the garbage collector’s marking behavior, we have proposed validation code that compares the outgoing edges for each node in the heap snapshot versus the objects visited by the actual garbage collection code and crashes the process if there is any mismatch.

This validation will be included in debug builds (including those that we use for daily automated testing), so we can quickly find and fix any problems that cause a mismatch between the snapshot and the garbage collector’s behavior.

Deoptimization data

Microsoft Teams engineers found that some large object graphs were retained by objects named “(code deopt data)”, like in the following screenshot:

Just like the false FeedbackVector paths, DevTools in this case indicate that a JavaScript function retains some V8-internal objects, over which the developer has no control, which in turn retains another JavaScript function. Unlike the previous case though, here DevTools accurately depicted what was happening within V8, which was a memory leak. We have fixed this leak in Microsoft Edge version 98.

Finalization registries

In yet another excellent report from Microsoft Teams, we saw that a bunch of FinalizationRegistry objects were retained directly by other FinalizationRegistries, and causing high memory usage:

This turned out to be another V8-internal memory leak, which we’ve fixed as well.

In closing

We care about ensuring that web developers have the tools they need to diagnose and fix memory usage problems. At the most fundamental level, that means that the JavaScript engine needs to not leak memory and accurately represent the heap state when taking snapshots for DevTools.

We are committed to ensuring that everything shown in the Retainers pane is true, and that V8 doesn’t have internal memory leaks. We’ve fixed the problems that we’re aware of, but please let us know if you see others.

– Seth Brenith, Senior Software Engineer, Microsoft Edge

Source

Continue Reading
Click to comment

Leave a Reply

Your email address will not be published.

Microsoft

Minions DLC update lands on Minecraft

Illumination’s Minions mashup just got an update that Minecraft players can access now. “Playing as Gru, your quest is to become the biggest, baddest super-villain, and to do that you’ll need to gather gadgets, Minions and your courage to take on the Vicious 6: a team of supervillains who aren’t thrilled about your attempts to…

Published

on

By

Illumination’s Minions mashup just got an update that Minecraft players can access now.

“Playing as Gru, your quest is to become the biggest, baddest super-villain, and to do that you’ll need to gather gadgets, Minions and your courage to take on the Vicious 6: a team of supervillains who aren’t thrilled about your attempts to steal their thunder,” writes Sophie Austin on Minecraft.net. “As your devious plans take shape, you’ll need to fill up your villain-o-meter by sneaking, racing and directing your Minions in increasingly crafty ways before facing your foes in a fiery final showdown.”

Also, to celebrate the launch of this update and the new Minions movie, you can get a free in-game Minion hoodie in the Dressing Room.

If you’ve already bought the Minions x Minecraft mash-up, the new update will be available free of charge. If you haven’t, head on over to Minecraft Marketplace, where you can buy the downloadable content.

Visit Minecraft.net to find out more.

Source

Continue Reading

Microsoft

Play Sea of Thieves’ fifth free adventure, ‘The Forsaken Hunter,’ until July 14

Hey Sea of Thieves players: Swap your pirate hat for a detective’s cap as you uncover clues and find out the fate of the missing Merrick in “The Forsaken Hunter,” the game’s latest narrative-driven adventure, from June 30 to July 14. This update is available for free to all Sea of Thieves players who have…

Published

on

By

Hey Sea of Thieves players: Swap your pirate hat for a detective’s cap as you uncover clues and find out the fate of the missing Merrick in “The Forsaken Hunter,” the game’s latest narrative-driven adventure, from June 30 to July 14.

This update is available for free to all Sea of Thieves players who have bought the game on Windows 10/11 PC, Xbox Series X|S, Xbox One or via Steam, or players who have access to it with Xbox Game Pass. Simply download and install the latest Sea of Thieves update to get access.

Head over to Xbox Wire to watch the trailer and find out more.

Source

Continue Reading

Business

Customers share their stories on migrating to Dynamics 365

At some point, we’ve all experienced regret over not doing something. Opportunity passes us due to our over analysis, indecision, and uncertainty. Even though we’ve all done this, we rarely seek the advice of others, thinking our situation is somehow unique or different. This rationale is common among the on-premises organizations we speak to. They…

Published

on

By

At some point, we’ve all experienced regret over not doing something.

Opportunity passes us due to our over analysis, indecision, and uncertainty. Even though we’ve all done this, we rarely seek the advice of others, thinking our situation is somehow unique or different.

This rationale is common among the on-premises organizations we speak to. They understand the benefits for moving to the cloud but chose to focus on all the reasons not to—aging infrastructure, manual processes, and siloed data notwithstanding.

Hearing how others are approaching this critical technological evolution can be invaluable. Not to mention relatable. Here are a few customer stories we’ve collected; perhaps you might recognize yourself or the circumstances?

Discover other Dynamics AX and Dynamics CRM customer stories to learn about migration best practices and the benefits others are seeing in the cloud.

A small company with sizeable goals

Sonee Sports, is a small 28-year-old, family-run retail chain in the Maldives. The company moved its Microsoft Dynamics AX to Dynamics 365 in the cloud to streamline its resource planning, point of sale, and relationship management activities. Sonee Sports has grown from a single desk in a hardware store to 10 stores across the Maldives however, this growth didn’t come without challenges, particularly when it came to technology.

Maumoon Abdullah, Sonee Sports’s co-founder, has long advocated for using technology to understand, retain, and engage new customers. “In 2016, we had a customer churn rate of 10 percent—not good. We knew that technology was key to keeping our business afloat,” Abdullah said. However, their previous enterprise resource planning (ERP) took hours to generate reports, the data was inaccurate, so decision makers stopped using it. In time, Sonee Sports realized it had to move its entire business to the cloud.

With help from Mumbai-based CloudFronts, a Microsoft Partner Network partner, Sonee Sports upgraded to Microsoft Dynamics 365, deployed Microsoft Power BI for analytics, and rolled out a cloud-based e-commerce system. “We needed an all-around ERP system that was reliable, easy to use, and mobile-friendly and that offered a host of options for accessing information. Dynamics 365 Retail fits these criteria very well.” Abdullah says. 

With this setup, Sonee Sports has cut its IT maintenance costs by 38 percent and improved customer retention by over 8 percent.

“With Dynamics 365, we finally have the data we need to understand our customers.” Abdullah says. “The value of this is priceless.”

Read more about Sonee Sport’s migration to Dynamics 365.

A growing city with changing needs

It can be easy to forget that cities are a lot like corporations—they provide services to their “customers,” often relying on technology to deliver the goods.

Bristol is a diverse city in southwest England, with more than 90 languages spoken and a population of just over 463,000. Bristol City Council is the unitary authority and is responsible for a wide range of services including taxation, waste management, education, etc. Like many struggling municipalities, Bristol City Council felt it could no longer rely on its IT system to meet day-to-day demands of the city. Its systems weren’t agile or mobile-friendly and lacked a unified platform to support collaboration or leverage data insights.

“The council was historically, deeply dissatisfied with its IT systems and processes.” says Simon Oliver, Director of Digital Transformation at Bristol City Council. 

Bristol City Council realized the only way forward was to modernize its Dynamics CRM 2016 instance to Dynamics 365, which would improve efficiency and collaboration. Moving, however, was a significant undertaking, involving migrating 54 workloads and orchestrating nearly 500 ecosystem partners, and staff.

Built on Microsoft Azure, with Microsoft Power Platform and Office 365, Bristol City Council deployed Dynamics 365 alongside toolsets to increase productivity. “Working with Microsoft has given us an opportunity to look at our entire approach to delivering IT services, to reshape our way of thinking and the culture of the IT department,” explains Oliver. 

Read more about the Bristol City Council transformation.

An industry leader looking to drive purpose

Peet Limited, a leader in Australia’s property industry, believes in helping people gain peace of mind through property ownership. And their commitment to IT innovation has enabled them to remain competitive through market disruptions.

As part of its ongoing mission to offer quality service, the company partnered with Microsoft to upgrade its IT systems and move critical line-of-business applications to the cloud. Justyn Bridge, IT Manager at Peet Limited, explained, “Microsoft 365 is a complete, intelligent solution…it empowers Peet employees to be creative and work together.” Peet Limited had confidence in Microsoft because the organization was already using both Dynamics CRM and Dynamics AX, for its customer relationship management (CRM) and ERP, respectively.

Peet Limited designed its cloud strategy around security with the goal of end-to-end protection in mind; for them, security promoted value. Bridge explains that one of the best benefits of using Microsoft 365 is having a “single pane of glass” to view Peet Limited’s security landscape. Using Microsoft’s Advanced Threat Analytics, Peet Limited had a succinct, real-time view of an attack timeline with the ability to analyze and identify normal versus suspicious user or device behavior.

Considering the project, Bridge notes, “We sought better end-to-end protection, and Microsoft 365 gave us that. Our business has gained security in both protection and mindset.”

Read more about Peet Limited’s story.

When you’re ready to migrate, Microsoft is here to help

We all have stories that define us. Organizations are no different. Whether you’re looking to grow your footprint, improve services, or modernize your underlying technology, the Microsoft Cloud can meet your changing needs. While migrating to the cloud should be a business priority, the experiences above illustrate the importance of planning. When you’re ready to migrate your on-premises solution to the cloud, Microsoft is here to support your journey.

Learn from the other Dynamics AX and Dynamics CRM migration stories in our library. Visit the Dynamics 365 Migration Community to access partner discovery resources and other assets to help you migrate with confidence.

Source

Continue Reading

Trending

Copyright © 2021 Today's Digital.