Your SlideShare is downloading. ×
0
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Design and Development performance considerations
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Design and Development performance considerations

2,924

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,924
On Slideshare
0
From Embeds
0
Number of Embeds
11
Actions
Shares
0
Downloads
19
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. NEW ZEALAND
    SHAREPOINT
    CONFERENCE
    MARCH 16+17 2011
  • 2. Elaine van Bergen
    Design and Development performance considerations
  • 3. Elaine van BergenArchitect OBS Melbourne
    SharePoint MVP
    Microsoft Virtual Technical Solutions Professional
    Co-organiser of Melbourne’s MOSSIG (Microsoft Office Special Interest Group) and SharePoint Saturday Melbourne
    @laneyvb on Twitter
    Blog at http://laneyvb.blogspot.com/
  • 4. Agenda
  • How to Enable
  • MasterPage Placement
    <Sharepoint:DeveloperDashboardLauncher
    ID="DeveloperDashboardLauncher"
    NavigateUrl="javascript:ToggleDeveloperDashboard()"
    runat="server"
    ImageUrl="/_layouts/images/fgimg.png"
    Text="<%$Resources:wss,multipages_launchdevdashalt_text%>"
    OffsetX=0
    OffsetY=78
    Height=16
    Width=16 />
    <div id="DeveloperDashboard" class="ms-developerdashboard" />
    <SharePoint:DeveloperDashboard runat="server" />
  • 12. SPMonitored Scope
    using (SPMonitoredScope monitoredScope = new SPMonitoredScope("Monitor My Code"))
    { LongRunningCall(); }
    SPCriticalTraceCounter.AddDataToScope(99, "What happened ?", 15, "Add additional info here");
    1 Critical
    4 Exception (Watson)
    6 Assert
    8 Warning
    10 Unexpected
    15 Monitorable
  • 13. DEV DASHBOARD
    Show you something cool
  • 14. DevDashVis
    • http://devdashvis.
    codeplex.com
  • 15. Types of Cache
    • Output – Generated HTML for future requests
    • 16. Object – Common objects and query results
    • 17. BLOB – Commonly requested files put on WFE disk
    http://download.microsoft.com/download/7/F/0/7F069D0B-B6BD-4692-868B-E8555BB72445/SharePointServerCachesPerformance.docx
  • 18. Caching
  • 19. Output
    • Stores rendered aspx pages
    • 20. Enable output cache at site collection
    • 21. Time to live vs. Check for Changes
    • 22. Each page uses 2x+32 KB of memory
    • 23. Highly flexible with Cache Profiles
  • Profile Options
    • Perform ACL Check
    • 24. Enabled
    • 25. Duration
    • 26. Check for changes
    • 27. Vary by custom , http header ,query string ,user rights
    • 28. Cachability
    • 29. Safe for authenticated use
    • 30. Allow writers to view cached content
  • Profile Options Advanced
    • Per page layout
    • 31. Cache profile overrides for host header site collections avavilable for:
    varyByHeader
    varyByParam
    varyByCustom
    varyByRights
    cacheForEditRights
  • 32. OBJECT
    • Used by publishing, content by query web part, navigation, search query box, and metadata navigation
    • 33. Via code e.g. PortalSiteMapProvider
    • 34. Draft vs published = PortalSuperUserAccountand PortalSuperReaderAccount
  • Configuring Output Accounts
    • Super Reader = web policy read
    • 35. Super User = web policy full
    • 36. Not run as system
    • 37. Dedicated accounts not app pool or login
  • Cache multiplier
    1-10
    Visible with edit permissions
    11-20 Visible to members of group x
    21-30
    Visible to everyone
    31-40
    Visible to everyone
    Visible to super-user
    Visible to super-reader
    Visible to super-reader
    Visible to super-user
  • 38. BLOB
    • On disk on each WFE
    • 39. Best for infrequently changed css, js and images or large video
    • 40. Video is normally buffered from SQL on WFE adding latency, BLOB cache is nearly equivalent of IIS direct
    • 41. Adds http range support
  • BLOB
    • Configured per web application
    • 42. Extended web app has it’s own blob cache
    • 43. Long url’s can break blob cache (server relative > 160 characters)
    • 44. Can affect and be corrupted by IIS recycle if large
    • 45. Optimised for anonymous
  • BLOB Cache inVALIDating
    • Edit, Delete cached file = file removed
    • 46. Delete file not cached, delete folder, rename/delete list, change permissions, title, description, add/remove content type = all files in list removed
    • 47. Rename/delete web, add/remove permissions, change inheritance, add/update/delete roles = all files in web removed
    • 48. Delete site collection = all files in site collection removed
    • 49. Change user policy at web application = entire cache abandoned
  • Configuring
    • <BlobCache location="C:blobCache" path=".(gif|jpg|png|css|js)$" maxSize="10" enabled="false"/>
    • 50. Max-Age is optional , defaults to 86400 seconds (1 day)
    • 51. Also tune the IIS app pool startup and shutdown to > 300 seconds
  • Branding Storage Location
    • SharePoint Library
    • 52. User Centric
    • 53. Blob Cache can help
    • 54. Different libraries may have varied results for anonymous
    • 55. _Layouts
    • 56. Default SharePoint Max Age
    • 57. Custom Virtual Directory or dedicated web app
  • Caching Design for Images/CSS and Video
    • MAX AGE determines when to reload
    • 58. Authors want it to change asap
    • 59. Version CSS/Image to ensure reload
    • 60. For examples Myfile1.1.css
  • CACHING OBJECTS VIA Code
    • Consider if object is thread safe
    • 61. SPWEB is not therefore any item with embedded web like SPSListItemCollection can cause issues
    • 62. Lock and cache to object such as datatable
  • private static object _lock = new object();
    public void CacheData() {
    DataTableoDataTable;
    SPListItemCollectionoListItems;
    lock(_lock) {
    oDataTable= (DataTable)Cache["ListItemCacheName"]; I f(oDataTable== null)
    {
    oListItems= DoQueryToReturnItems();
    oDataTable= oListItems.GetDataTable(); Cache.Add("ListItemCacheName", oDataTable, ..);
    }
    }
    }
  • 63. CACHE
    Show you something cool
  • 64. Logging
  • 65. Dispose
    It’s complicated !
    64 bit helps hide the problem for longer
    Not just memory, SPRequest = 1:1 SQL connection
    http://blogs.msdn.com/b/rogerla
  • 66. Do NOT DISPOSe
    SPContext.Current.Site
    SPContext.Current.Web
    SPContext.Site
    SPContext.Web
    SPControl.GetContextWeb(..)
    SPControl.GetContextSite(..)
    SPFeatureReceiverProperties.Feature.Parent
    SPItemEventProperties.ListItem.Web
    SPList.BreakRoleInheritance()
    Do not call list.ParentWeb.Dispose()
    SPListEventProperties.Web
    SPListEventProperties.List.Web
    SPSite.RootWeb
    Problems may occur when SPContext.Web has equality to the SPContext.Web.. make sure you dispose of SPSite and it will cleanup sub webs automatically
    SPSite.LockIssue
    SPSite.Owner
    SPSite.SecondaryContact
    SPWeb.ParentWeb
    SPWebEventProperties.Web
  • 67. SHarePoint 2010 changes
    Microsoft.SharePoint.WebControls.SiteAdminsitrationSelector.CurrentItem 2007 must dispose, 2010 don’t
    Event Recievers
    Properties.OpenWeb() – 2007 dispose of SPWeb
    SPItemEventProperties.Web instead and no dispose
  • 68. Dispose Monitoring
    SPDisposeCheck
    ULS Logs
    Memory Internals
    SQL Server Connections
  • 69. Querying Methods
    • Search Object model solid performed but delayed data
    • 70. PortalSitemapProvidor if data is low and relatively static
    • 71. SPListItemsGetDataTable and SPQuery for list data retrieval
    • 72. For each is the last option
    http://office.microsoft.com/download/afile.aspx?AssetID=AM102377231033
  • 73. Content Iterator
    SPQuery query = new SPQuery(); query.Query= "<Where><Eq><FieldRef Name="MyIndexedField"/><Value Type="Text">FieldValue</Value></Eq></Where>" + ContentIterator.ItemEnumerationOrderByNVPField;
    ContentIterator ci = new ContentIterator();ci.MaxItemsPerQuery = 500;
    ci.ProcessItemsInList(query,
    delegate(SPListItem item)
    {
    // Work on each item.
    },
    delegate(SPListItem item, Exception e)
    {
    // Handle an exception that was thrown while iterating. // Return true so that ContentIteratorrethrows the exception. } );
  • 74. Throttling Types
    • List Throttling
    • 75. Row and Column Throttling
    • 76. Http Request
    • 77. Unique Permissions
    • 78. You can add your own
  • List Throttling
    • Any operation that impacts x amount of items is throttled
    • 79. Default is 5000 items, beware of table locks if you change
    • 80. Overrides for auditors and administrators only in OM
    • 81. Machine admin overrides all throttle limits
    • 82. Happy hour(s)
  • Common operations THAT ARE throttled
    Create, remove, delete an indexed field
    Add, Modify indexing on field
    Delete list
    Save list as template
    Sort , Filter by non-indexed field
    Delete site
    Change field uniqueness
    Show totals
    Change list relationship state on field
    Enable disable attachments
  • 83. List Throttling with Metadata Nav
    • Retry Query with different indexed fields
    • 84. Fallback query for subset of data
    • 85. Enabled for all lists in the web once metadata navigation feature is enabled
    • 86. Just via the UI not the OM
  • List Throttling VIA Code
    using (SPSite site = new SPSite (“http://site”))
    {
    using (SPWeb web = theSite.RootWeb)
    {
    SPList list = web.Lists[“Listname”];
    SPQuery query = new SPQuery();
    query.QueryThrottleMode = SPQueryThrottleOption.Override;
    //setup query here
    SPListItemCollection collection = list.GetItems(query);
    //do something with your data here
    }
  • 87. Health Score
    Health score is given back as part of the http headers X-SharePointHealthScore
    0 is healthiest, 10 is the worst
    Office applications such as workspace use adaptive sync based on health score
    Consider use if performing high load operations remotely
  • 88. Health Score
  • 89. Agenda Recap
  • Questions ?
    @Laneyvbelaine.vanbergen@obs.com.au
  • 95. Gold Sponsors
    Silver Sponsors
    Bronze Sponsors

×