SlideShare a Scribd company logo
Memory Management in SharePoint 2007 Development Matt Vignau Liquid Hub, Inc www.liquidhub.com [email_address]
About me Matt Vignau
Working with SharePoint since SP 2003
Work for Liquid Hub
User Group speaker
Overview In C# .NET development we have the Garbage Collector
No more destructors
SPSite and SPWeb not always disposed
Leaves growing used memory block
Leads to problems
Memory Usage Available blocks of space
Application Pool limitations
64 bit vs 32 bit
Restaurant Analogy Space in memory is reserved, then committed
Memory is reserved in chunks – like number of diners
Memory wants to “sit together”
Memory Leaks Build with each use of the code
SPSite and SPWeb sites have ~2kB size wrappers
Object sizes are closer to 1-2 MB
One site with 15 webs accessed twice has used around 30 MB of system memory; for *one* user
Can bring down entire farms
Running in Debug mode
/3 GB switch – Doesn't work in SharePoint!
Example 1 public void GetNavigationInfo() {     SPWeb OurWeb = http://intranet.litwareinc.com;     foreach( SPWeb OurWeb  in  OurWeb .GetSubWebsForCurrentUser())     {        //Our Subsite code here       } }
Memory Danger Signs Does the application pool refresh frequently when under load? Memory reset threshold 800 megs -1.5 gigs Does the system perform poorly under heavy loads?

More Related Content

PPTX
Secure code 3rd_party_libs
ODP
WebSockets with PHP: Mission impossible
PDF
Connecting to the network
PDF
Node intro
PDF
Application Logging With Logstash
PDF
PSR-3 logs using Monolog and Graylog
ODP
Easy Tutorial Step-by-Step How to use Airolib-ng
PDF
2013 02-26 - Software Tests with Mongo db
Secure code 3rd_party_libs
WebSockets with PHP: Mission impossible
Connecting to the network
Node intro
Application Logging With Logstash
PSR-3 logs using Monolog and Graylog
Easy Tutorial Step-by-Step How to use Airolib-ng
2013 02-26 - Software Tests with Mongo db

What's hot (20)

PPT
Heap & thread dump
PDF
Java Heap Dump Analysis Primer
PPTX
A Big, Fast and Persistent Queue
PPTX
Socket programming with php
PDF
Joy of Unix
KEY
Why Bundler 1.1 will be much faster
PDF
Vancouver presentation
PDF
JCache / JSR107 shortcomings
TXT
Sql related links
PDF
ActionHeroJS Talk
PDF
cache2k, Java Caching, Turbo Charged, FOSDEM 2015
PPTX
Xitrum internals
PDF
MongoDb scalability and high availability with Replica-Set
PDF
Memory Management of C# with Unity Native Collections
PPTX
Buffer overflow for Beginners
PDF
DevOps: Falando um pouco sobre desenvolvimento orientado a testes com Puppet
PDF
톰캣 #09-쓰레드
DOC
12 Rocking Apache .htaccess Tutorial ...
PDF
Thread Dump Analysis
RTF
RegistryModClass
Heap & thread dump
Java Heap Dump Analysis Primer
A Big, Fast and Persistent Queue
Socket programming with php
Joy of Unix
Why Bundler 1.1 will be much faster
Vancouver presentation
JCache / JSR107 shortcomings
Sql related links
ActionHeroJS Talk
cache2k, Java Caching, Turbo Charged, FOSDEM 2015
Xitrum internals
MongoDb scalability and high availability with Replica-Set
Memory Management of C# with Unity Native Collections
Buffer overflow for Beginners
DevOps: Falando um pouco sobre desenvolvimento orientado a testes com Puppet
톰캣 #09-쓰레드
12 Rocking Apache .htaccess Tutorial ...
Thread Dump Analysis
RegistryModClass
Ad

Similar to Matthew Vignau: Memory Management in SharePoint 2007 Development (20)

PPTX
Design and Development performance considerations
PPTX
Sharepoint Saturday India Online best practice for developing share point sol...
PDF
Share point 2013 coding standards and best practices 1.0
PPTX
SharePoint underground (Unmanaged Code and SharePoint Internals)
PPTX
Top 7 mistakes
PPTX
Building high performance and scalable share point applications
PDF
Best practices with development of enterprise-scale SharePoint solutions - Pa...
PDF
SharePoint TechCon 2009 - 803
PDF
SPCA2013 - SharePoint Nightmares - Coding Patterns and Practices
PPTX
Tipstricksandbestpracticesformanagingmicrosoftofficesharepointserver2007 0905...
PPTX
ASP.NET 4.0 Cache Extensibility
PDF
Asp.net caching
PDF
SharePoint TechCon 2009 - 602
PPTX
10 performance and scalability secrets of ASP.NET websites
PPTX
SharePoint Intelligence Introduction To Share Point Designer Workflows
PDF
ASP.NET Scalability - DDD7
PPTX
Sharepoint Performance - part 2
PPTX
HSPS 2015 - SharePoint Performance Santiy Checks
PPTX
Where to save my data, for devs!
PPTX
50 Shades of SharePoint: SharePoint 2013 Insanity Demystified
Design and Development performance considerations
Sharepoint Saturday India Online best practice for developing share point sol...
Share point 2013 coding standards and best practices 1.0
SharePoint underground (Unmanaged Code and SharePoint Internals)
Top 7 mistakes
Building high performance and scalable share point applications
Best practices with development of enterprise-scale SharePoint solutions - Pa...
SharePoint TechCon 2009 - 803
SPCA2013 - SharePoint Nightmares - Coding Patterns and Practices
Tipstricksandbestpracticesformanagingmicrosoftofficesharepointserver2007 0905...
ASP.NET 4.0 Cache Extensibility
Asp.net caching
SharePoint TechCon 2009 - 602
10 performance and scalability secrets of ASP.NET websites
SharePoint Intelligence Introduction To Share Point Designer Workflows
ASP.NET Scalability - DDD7
Sharepoint Performance - part 2
HSPS 2015 - SharePoint Performance Santiy Checks
Where to save my data, for devs!
50 Shades of SharePoint: SharePoint 2013 Insanity Demystified
Ad

More from SharePoint Saturday NY (20)

PDF
Sb chatterjee share point workspace 2010 in action
PPTX
Joel Oleson: SharePoint 2010 Upgrade Drill Down
PPTX
Peter Ward: The True Power of SharePoint Designer Workflows
PDF
Chris Geier: Information Management in SharePoint 2010
PPTX
Mostafa Elzoghbi: SharePoint 2010 Sanbbox Solutions bestpractices - public
PPTX
John Burkholder: SharePoint 2010 in a multi tenant and hosted environment-nyc
PPTX
John Burkholder: Disaster Recovery in SharePoint 2010
PPTX
Chris McNulty - Managed Metadata and Taxonomies
PPTX
Chris McNulty: ECM/WCM Planning, Implementation and Migration Strategies
PPTX
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
PPTX
Jaime Velez: SharePoint 2010 Social Computing
PPTX
Geoff Varosky: Creating Custom Actions in SharePoint 2010
PPTX
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
PPTX
Alphonso Scarborough: SharePoint 101
PPTX
Kathryn Birstein: SharePoint 2010 Business Intelligence-Bringing it All Together
PPTX
Susan Lennon: Building SharePoint Dashboards
PPTX
Mostafa Elzoghbi: SharePoint 2010 Sandbox Solutions Best Practices
PPTX
Scott Lavoie: Best Practices and Pain Points of SharePoint Training
PPTX
Paul Galvin: Introduction to Infopath and Best Practices
PPTX
Greg Hurlman: Developing Custom Service Applications
Sb chatterjee share point workspace 2010 in action
Joel Oleson: SharePoint 2010 Upgrade Drill Down
Peter Ward: The True Power of SharePoint Designer Workflows
Chris Geier: Information Management in SharePoint 2010
Mostafa Elzoghbi: SharePoint 2010 Sanbbox Solutions bestpractices - public
John Burkholder: SharePoint 2010 in a multi tenant and hosted environment-nyc
John Burkholder: Disaster Recovery in SharePoint 2010
Chris McNulty - Managed Metadata and Taxonomies
Chris McNulty: ECM/WCM Planning, Implementation and Migration Strategies
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
Jaime Velez: SharePoint 2010 Social Computing
Geoff Varosky: Creating Custom Actions in SharePoint 2010
Brian Jackett: Managing SharePoint 2010 Farms with Powershell
Alphonso Scarborough: SharePoint 101
Kathryn Birstein: SharePoint 2010 Business Intelligence-Bringing it All Together
Susan Lennon: Building SharePoint Dashboards
Mostafa Elzoghbi: SharePoint 2010 Sandbox Solutions Best Practices
Scott Lavoie: Best Practices and Pain Points of SharePoint Training
Paul Galvin: Introduction to Infopath and Best Practices
Greg Hurlman: Developing Custom Service Applications

Recently uploaded (20)

PDF
Machine learning based COVID-19 study performance prediction
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Electronic commerce courselecture one. Pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Machine learning based COVID-19 study performance prediction
Review of recent advances in non-invasive hemoglobin estimation
Spectral efficient network and resource selection model in 5G networks
NewMind AI Weekly Chronicles - August'25 Week I
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Dropbox Q2 2025 Financial Results & Investor Presentation
Spectroscopy.pptx food analysis technology
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Electronic commerce courselecture one. Pdf
Programs and apps: productivity, graphics, security and other tools
Diabetes mellitus diagnosis method based random forest with bat algorithm
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton

Matthew Vignau: Memory Management in SharePoint 2007 Development

Editor's Notes

  • #4: One of the remarkable features of .NET development has been the advent of the garbage collector and automatic management of the memory used by programs.  This is a tremendous time saver as the developer no longer has to create the de-constructors that were traditionally written in languages such as C++.  While this feature is a powerful new tool in the developer’s arsenal, it can also prove to be a dangerous flaw, as numerous programmers have found when working with SharePoint 2007.
  • #19: The above code is now threadsafe and caches to a DataTable instead of using an SPWeb object