Home > ASP.NET, Web Development > ASP.NET AJAX 4.0 Preview 5 Released, Includes “Disposable Objects” Performance Fix!

ASP.NET AJAX 4.0 Preview 5 Released, Includes “Disposable Objects” Performance Fix!

Good news, ASP.NET AJAX 4.0 Preview 5 is here! Better yet, Microsoft has overhauled the implementation of tracking disposable objects to include the performance enhancement that was discussed in my “ASP.NET AJAX ‘Disposable Objects’ Performance Heads Up” posts (Part I & II).

So how’d they do it? They tag each disposable object with an integer value which represents the objects position in an internal array using a property named “__msdisposeindex” when it’s registered. When it’s unregistered they delete that property from the object and from the array. Small performance heads up that there is a small hidden cost of reallocating the array once 1000 object have been removed. This keeps the array from growing into infinity should you keep an application open in the browser for a long time and create/destroy lots of disposable objects.

So, it’s not exactly as discussed previously since they use an array/index approach instead of a global, incremented counter with a hash, but… problem solved!

Advertisement
Categories: ASP.NET, Web Development
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.