

ASP.NET Site Performance Secrets. Simple and proven techniques to quickly speed up your ASP.NET website



ASP.NET Site Performance Secrets. Simple and proven techniques to quickly speed up your ASP.NET website - Najlepsze oferty
ASP.NET Site Performance Secrets. Simple and proven techniques to quickly speed up your ASP.NET website - Opis
Do you think that only experts with a deep understanding of the inner workings of ASP.NET, SQL Server, and IIS can improve a website's performance? Think again – because this book tosses that notion out of the window. It will help you resolve every web developer's nightmare – a slow website – with angry managers looking over your shoulder, raging calls from advertisers and clients – the lot. You don't have the time or energy to gain a thorough and complete understanding of ASP.NET performance optimization – You just need your site to run faster! This book will show you how.This hands-on book shows how to dramatically improve the performance of your ASP.NET-based website straight away, without forcing you through a lot of theoretical learning. It teaches you practical, step-by-step techniques that you can use right away to make your site faster with just the right amount of theory you need to make sense of it all.Start reading today and you could have a faster website tomorrow.Unlike other performance-related books, here you'll first learn how to pinpoint the bottlenecks that hold back your site's performance, so you can initially focus your time and energy on those areas of your site where you can quickly make the biggest difference. It then shows you how to fix the bottlenecks you found with lots of working code samples and practical advice, and just the right amount of theoretical detail.The first chapter details techniques for diagnosing performance issues using Waterfall charts. Subsequent chapters then each focus on one individual aspect of your website, providing (...) więcej you with numerous real-life scenarios and performance-enhancing techniques for each of them. In the last chapter, you learn how to effectively load-test your environment in order to measure the change in performance of your site without having to update your production environment – whether it is a new release or simply a small change in the database. Spis treści: ASP.NET Site Performance SecretsTable of ContentsASP.NET Site Performance SecretsCreditsAbout the AuthorAbout the ReviewersPrefaceWhat this book coversWhat you need for this bookWho this book is forConventionsReader feedbackCustomer supportErrataPiracyQuestions1. High Level DiagnosisAssuring good performanceContinuous monitoringSetting performance goalsIterative improvementsMonitoring servicesHigh-level diagnosis with Waterfall chartsCreating a Waterfall chart using FirebugInstalling FirebugCreating the Waterfall chartInterpreting the Waterfall chartRequest and response informationTimeline informationPage-level informationSaving informationCategorizing bottlenecks using Waterfall chartsScenario 1: Main .aspx file takes long to arriveScenario 2: Main .aspx file takes long to load over the InternetScenario 3: Images take long to loadScenario 4: JavaScript file blocks renderingWaterfall generators for other browsersFiddler (browser-independent)Internet Explorer via WebPagetestGoogle ChromeApple SafariMore Waterfall chart generatorsFind out moreSummary2. Reducing Time to First BytePinpointing bottlenecksMemoryWindows Server 2003Windows Vista, Windows Server 2008, or Windows 7Simulating a memory shortageCachingCPUThread usageLong wait timesAdditional measuresDeploymentBuilding projects in release modePublishing your websiteDisabling debug modeReducing number of assembliesReducing round tripsUsing Server.Transfer instead of Response.RedirectAlways specifying the default file in URLsPermanent redirectsMinimizing CNAME recordsSSLUnwanted requestsSearch engine botsHotlinkingCAPTCHAScrapersUsability testingFind out moreSummary3. MemoryManaged resourcesLife cycleGenerationsLarge Object HeapCountersCLR profilerGarbage collector versionsAcquire lateRelease earlyUsing StringBuilder to concatenate stringsUsing StringBuilderWhen not to use StringBuilderStringBuilder capacityUsing Compare for case-insensitive comparesUsing Response.Write bufferPooling objects over 85 KBUnmanaged resourcesIDisposableCountersSessionsReducing session state life timeReducing space taken by session stateUsing another session modeStop using session stateFind out moreSummary4. CPUIdentifying bottlenecksToolsData accessConnection poolingDataSet versus ListReturning multiple result setsSending multiple inserts in one goUsing native data providersExceptionsRevealing the time taken by exceptionsCountersDataBinder.EvalGarbage collectorThreadingStringBuilderRegex instantiationUtcNowForeachVirtual propertiesAvoid unnecessary processingTrimming HTTP pipelineFind out moreSummary5. CachingBrowser cachingOutputCache directiveEnabling caching in codeDisabling caching in codeProxy cachingCaching different versions of the same pageCookiesRemoving query string from URLURLRewrite extension to IIS 7RewritePath method in Global.asaxResetting the form action attributeOutput cachingWhat to cache and what not to cacheEnabling output cachingOutput cache exampleVaryByParamVaryByHeaderVaryByCustomVaryByCustom by browserFragment cachingPost-cache substitutionOutput cache providerCreating an output cache providerSetGetAddRemoveUsing an output cache providerKernel caching and IIS 7 output cachingConfiguring IIS cachingLimitations of kernel cachingChecking the contents of the kernel cacheData cachingBasic useExpiryPriorityFile dependenciesDatabase dependenciesRestrictions on queriesStarting the Service BrokerStarting the listening serviceCreating the dependencyItem removed callbackThings to keep in mindOptimal use of server cacheFind out moreSummary6. Thread UsageAsynchronous web service accessSynchronous versionAsynchronous versionAsynchronous data access layerUsageImplementationPerformance testingAsynchronous generic handlersSynchronous versionAsynchronous versionImplementationPerformance testingAsynchronous file writesSynchronous versionAsynchronous versionA word of cautionAsynchronous web requestsConfiguration changesIIS 6, IIS 7 Classic ModeI/O-related configurationASP.NET 2.0IIS 7 integrated modeMaximum queue sizeSetting timeouts aggressivelyFind out moreSummary7. Reducing Long Wait TimesMeasuring wait timesCreating custom countersCreating counters with Visual StudioCreating counters programmaticallyUpdating counters in your codeViewing custom counters in perfmonWaiting concurrentlyRetrieving multiple result sets from the databaseReducing overhead by using off-box session modesReducing trips to the databaseSetting EnableSessionStateReducing serialization and transfer overheadCutting your dependence on sessionsThread lockingMinimizing the duration of locksUsing granular locksUsing System.Threading.InterlockedUsing ReaderWriterLockAcquiring a reader lockAcquiring a writer lockAlternating readers and writersOptimizing disk writesAvoiding head seeksUsing FileStream.SetLength to avoid fragmentationUsing 64 K buffersDisabling 8.3 filenamesFind out moreSummary8. Speeding up Database AccessPinpointing bottlenecksMissing indexes and expensive queriesMissing indexesExpensive queriesUnused indexesLockingExecution plan reusePerformance countersdm_exec_query_optimizer_infosys.dm_exec_cached_plansFragmentationMemoryDisk usageCPUFixing bottlenecksMissing indexesClustered indexNon-clustered indexIncluded columnsSelecting columns to give an indexWhen to use an indexWhen not to use an indexColumn updated oftenLow specificityWhen to use a clustered indexMaintaining indexesExpensive queriesCache aggregation queriesKeeping records shortConsidering denormalizationBeing careful with triggersUsing table variables for small temporary result setsUsing full-text search instead of LIKEReplacing cursors with set-based codeMinimizing traffic from SQL server to web serverObject namingUsing SET NOCOUNT ONUsing FILESTREAM for values over 1 MBAvoiding functions on columns in WHERE clausesUsing UNION ALL instead of UNIONUsing EXISTS instead of COUNT to find existence of recordsCombining SELECT and UPDATELockingGathering detailed locking informationReducing blockingReducing deadlocksExecution plan reuseAd hoc queriesSimple parameterizationsp_executesqlStored proceduresPreventing reuseFragmentationIndex rebuildIndex reorganizeHeap table defragmentationMemoryDisk usageOptimizing query processingMoving the logfile to a dedicated physical diskReducing fragmentation of the NTFS filesystemConsidering moving the tempdb database to its own diskSplitting the database data over two or more disksMoving heavily-used database objects to another diskUsing the optimal RAID configurationCPUFind out moreSummary9. Reducing Time to Last BytePinpointing bottlenecksCompressionViewStateWhat is ViewState?Why reduce ViewState?Measuring your ViewStateQuickly finding where ViewState is an issueMeasuring compressed ViewStateHaving ViewState size on status barOptimizing formsWhite spaceFixing bottlenecksViewStateSeeing ViewState generated by each controlDisabling ViewstateIdentifying controls that do not need ViewStateReloading from database cacheStoring a shorter version of the property valueStoring ViewState on the serverCompressing ViewstateImplementing compressionImplementing decompressionUsing ViewState compression on a pageReducing white spaceCreating the filterCreating the HTTP ModuleAdding the HTTP Module to web.configAdditional measuresEvent validationInline JavaScript and CSSAvoiding inline stylingReducing space taken by ASP.NET IDsOpting out of IDsKeeping IDs shortUsing ASP.NET comments instead of HTML commentsUsing Literal control instead of Label controlAvoiding repetitionUsing shorter URLsFind out moreSummary10. CompressionAgreeing on compressionConfiguring compression in IIS 7Installing the dynamic content compression moduleEnabling compressionSetting compression by site, folder, or fileCompression levelDisabling compression based on CPU usageSetting the request frequency threshold for static compressionCaching compressed dynamic filesStoring compressed files in the output cacheWhat if a client doesnt accept compressed content?Configuring compression in IIS 6Switching on compression in the IIS ManagerSetting permissions on the folder where compressed static files are cachedUpdating the metabaseResetting the IIS serverConfiguring compression in IIS 5Using compression in your development environmentInstalling IIS 7Enabling compressionCreating a development site in IISModifying your project so it uses the development siteMeasuring the difference compression makesImproving the compressibility of your pagesIs compression the magic bullet?Find out moreSummary11. Optimizing FormsClient-side validationASP.NET validation controlsQuick exampleAvailable validator controlsValidation summaryDisabling validationOverheadValidate JavaScript libraryInitializationBuilt-in validation methodsAdding validation methodsFormatting error messagesContent Delivery Network (CDN)OverheadSubmitting forms asynchronouslyUpdatePanel controlPage MethodsWeb serviceGeneric handlerBuilding the generic handlerCross Site Request Forgery (CSRF) attacksCalling the generic handlerWCF Data Services and the Entity FrameworkCreating the entity data modelCreating the WCF Data ServiceCalling the WCF Data Service from JavaScriptBugs and limitations in WCF Data ServicesAllowing the precompiled site to be updatable when publishing your siteProviding database access to [NT AUTHORITY\NETWORK SERVICE]Disabling batch compilationCreating an activity indicatorAJAX-type gridsFree, lightweight gridsPaid, heavyweight gridsBuilding your own gridWorking sample codeFind out moreSummary12. Reducing Image Load TimesCachingCache-Control response headerPreventing conditional requestsExpires headerConfiguring Cache-Control in IIS 7Configuring Cache-Control in IIS 6Giving identical URLs to identical imagesServing images from cookieless subdomainsParallel loadingImage control adapterImage sizeUsing the optimal image formatWhy to avoid scaling images in HTMLToolsPNGOUTPngcrushJpegtranNConvertImageMagickCombining imagesWays to avoid imagesRounded corners in CSSUtility symbolsShortcut iconContent Delivery NetworkFind out moreSummary13. Improving JavaScript LoadingProblem: JavaScript loading blocks page renderingConfirming with a test siteApproaches to reduce the impact on load timesApproach 1: Start loading after other componentsApproach 2: Loading JavaScript more quicklyTechniques used with imagesFree Content Delivery NetworksGZIP compressionMinifying a JavaScript fileToolsImpact of minificationImplementing minificationHTTP handlerConfiguring the handler in web.configEnabling GZIP compression for dynamic filesCombining or breaking upWhen and why to combineWhen and why to break upMeasuring each scenarioPreventing 304 messagesImplementing automatic file combiningASP.NET ScriptManager ControlCompression (deflate) and HTML, CSS, JS Minification in ASP.NETCombres 2.0FileCombineRemoving unused codeApproach 3: Loading JavaScript on demandSeparating user interface code from render codeOnDemandLoader libraryInitializing OnDemandLoaderInvoking not-yet-loaded functionsPreloadingApproach 4: Loading Javascript without blockingMoving all mniejASP.NET Site Performance Secrets. Simple and proven techniques to quickly speed up your ASP.NET website - Opinie i recenzje
Na liście znajdują się opinie, które zostały zweryfikowane (potwierdzone zakupem) i oznaczone są one zielonym znakiem Zaufanych Opinii. Opinie niezweryfikowane nie posiadają wskazanego oznaczenia.