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

What's hot (20)

PPT
Heap & thread dump
Nishit Charania
 
PDF
Java Heap Dump Analysis Primer
Kyle Hodgson
 
PPTX
A Big, Fast and Persistent Queue
William Yang
 
PPTX
Socket programming with php
Elizabeth Smith
 
PDF
Joy of Unix
Raman Kannan
 
KEY
Why Bundler 1.1 will be much faster
Pat Shaughnessy
 
PDF
Vancouver presentation
Colleen_Murphy
 
PDF
JCache / JSR107 shortcomings
cruftex
 
TXT
Sql related links
Emmanuel Mugume Joshua
 
PDF
ActionHeroJS Talk
David Peralta
 
PDF
cache2k, Java Caching, Turbo Charged, FOSDEM 2015
cruftex
 
PPTX
Xitrum internals
Ngoc Dao
 
PDF
MongoDb scalability and high availability with Replica-Set
Vivek Parihar
 
PDF
Memory Management of C# with Unity Native Collections
Yoshifumi Kawai
 
PPTX
Buffer overflow for Beginners
Ajin Abraham
 
PDF
DevOps: Falando um pouco sobre desenvolvimento orientado a testes com Puppet
Marcelo Andrade
 
PDF
톰캣 #09-쓰레드
GyuSeok Lee
 
DOC
12 Rocking Apache .htaccess Tutorial ...
wensheng wei
 
PDF
Thread Dump Analysis
Dmitry Buzdin
 
RTF
RegistryModClass
John Zamoider
 
Heap & thread dump
Nishit Charania
 
Java Heap Dump Analysis Primer
Kyle Hodgson
 
A Big, Fast and Persistent Queue
William Yang
 
Socket programming with php
Elizabeth Smith
 
Joy of Unix
Raman Kannan
 
Why Bundler 1.1 will be much faster
Pat Shaughnessy
 
Vancouver presentation
Colleen_Murphy
 
JCache / JSR107 shortcomings
cruftex
 
Sql related links
Emmanuel Mugume Joshua
 
ActionHeroJS Talk
David Peralta
 
cache2k, Java Caching, Turbo Charged, FOSDEM 2015
cruftex
 
Xitrum internals
Ngoc Dao
 
MongoDb scalability and high availability with Replica-Set
Vivek Parihar
 
Memory Management of C# with Unity Native Collections
Yoshifumi Kawai
 
Buffer overflow for Beginners
Ajin Abraham
 
DevOps: Falando um pouco sobre desenvolvimento orientado a testes com Puppet
Marcelo Andrade
 
톰캣 #09-쓰레드
GyuSeok Lee
 
12 Rocking Apache .htaccess Tutorial ...
wensheng wei
 
Thread Dump Analysis
Dmitry Buzdin
 
RegistryModClass
John Zamoider
 

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

PPTX
Design and Development performance considerations
Elaine Van Bergen
 
PPTX
Sharepoint Saturday India Online best practice for developing share point sol...
Shakir Majeed Khan
 
PDF
Share point 2013 coding standards and best practices 1.0
LiquidHub
 
PPTX
SharePoint underground (Unmanaged Code and SharePoint Internals)
Karla Ponce
 
PPTX
Top 7 mistakes
Talbott Crowell
 
PPTX
Building high performance and scalable share point applications
Talbott Crowell
 
PDF
Best practices with development of enterprise-scale SharePoint solutions - Pa...
SPC Adriatics
 
PDF
SharePoint TechCon 2009 - 803
Andreas Grabner
 
PDF
SPCA2013 - SharePoint Nightmares - Coding Patterns and Practices
NCCOMMS
 
PPTX
Tipstricksandbestpracticesformanagingmicrosoftofficesharepointserver2007 0905...
corin29
 
PPTX
ASP.NET 4.0 Cache Extensibility
akrakovetsky
 
PDF
Asp.net caching
Mindfire Solutions
 
PDF
SharePoint TechCon 2009 - 602
Andreas Grabner
 
PPTX
10 performance and scalability secrets of ASP.NET websites
oazabir
 
PPTX
SharePoint Intelligence Introduction To Share Point Designer Workflows
Ivan Sanders
 
PDF
ASP.NET Scalability - DDD7
Phil Pursglove
 
PPTX
Sharepoint Performance - part 2
Regroove
 
PPTX
HSPS 2015 - SharePoint Performance Santiy Checks
Andreas Grabner
 
PPTX
Where to save my data, for devs!
SharePoint Saturday New Jersey
 
PPTX
50 Shades of SharePoint: SharePoint 2013 Insanity Demystified
Microsoft TechNet - Belgium and Luxembourg
 
Design and Development performance considerations
Elaine Van Bergen
 
Sharepoint Saturday India Online best practice for developing share point sol...
Shakir Majeed Khan
 
Share point 2013 coding standards and best practices 1.0
LiquidHub
 
SharePoint underground (Unmanaged Code and SharePoint Internals)
Karla Ponce
 
Top 7 mistakes
Talbott Crowell
 
Building high performance and scalable share point applications
Talbott Crowell
 
Best practices with development of enterprise-scale SharePoint solutions - Pa...
SPC Adriatics
 
SharePoint TechCon 2009 - 803
Andreas Grabner
 
SPCA2013 - SharePoint Nightmares - Coding Patterns and Practices
NCCOMMS
 
Tipstricksandbestpracticesformanagingmicrosoftofficesharepointserver2007 0905...
corin29
 
ASP.NET 4.0 Cache Extensibility
akrakovetsky
 
Asp.net caching
Mindfire Solutions
 
SharePoint TechCon 2009 - 602
Andreas Grabner
 
10 performance and scalability secrets of ASP.NET websites
oazabir
 
SharePoint Intelligence Introduction To Share Point Designer Workflows
Ivan Sanders
 
ASP.NET Scalability - DDD7
Phil Pursglove
 
Sharepoint Performance - part 2
Regroove
 
HSPS 2015 - SharePoint Performance Santiy Checks
Andreas Grabner
 
Where to save my data, for devs!
SharePoint Saturday New Jersey
 
50 Shades of SharePoint: SharePoint 2013 Insanity Demystified
Microsoft TechNet - Belgium and Luxembourg
 
Ad

More from SharePoint Saturday NY (20)

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

Recently uploaded (20)

PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
July Patch Tuesday
Ivanti
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
July Patch Tuesday
Ivanti
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Windsurf Meetup Ottawa 2025-07-12 - Planning Mode at Reliza.pdf
Pavel Shukhman
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 

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