1. The document discusses various optimizations that can be made to an ASP.NET MVC application to improve performance, including compiled LINQ queries, URL caching, and data caching.
2. Benchmark results show that optimizing partial view rendering, LINQ queries, and URL generation improved performance from 8 requests/second to 61.5 requests/second. Additional caching of URLs, statistics, and content improved performance to over 400 requests/second.
3. Turning off ASP.NET debug mode also provided a significant performance boost, showing the importance of running production sites in release mode.
CDC Stream Processing with Apache FlinkTimo Walther
An instant world requires instant decisions at scale. This includes the ability to digest and react to changes in real-time. Thus, event logs such as Apache Kafka can be found in almost every architecture, while databases and similar systems still provide the foundation. Change Data Capture (CDC) has become popular for propagating changes. Nevertheless, integrating all these systems, which often have slightly different semantics, can be a challenge.
In this talk, we highlight what it means for Apache Flink to be a general data processor that acts as a data integration hub. Looking under the hood, we demonstrate Flink's SQL engine as a changelog processor that ships with an ecosystem tailored to processing CDC data and maintaining materialized views. We will discuss the semantics of different data sources and how to perform joins or stream enrichment between them. This talk illustrates how Flink can be used with systems such as Kafka (for upsert logging), Debezium, JDBC, and others.
This document provides an overview of ASP.NET Web API, a framework for building HTTP-based services. It discusses key Web API concepts like REST, routing, actions, validation, OData, content negotiation, and the HttpClient. Web API allows building rich HTTP-based apps that can reach more clients by embracing HTTP standards and using HTTP as an application protocol. It focuses on HTTP rather than transport flexibility like WCF.
This document provides an introduction to JavaScript, covering basic concepts like data types, variables, operators, conditionals, loops, functions, arrays, and objects. It explains that JavaScript is an interpreted language that allows dynamic and interactive functionality on websites. Key points are demonstrated through examples, like using alert to output "Hello World" and basic math operations with variables.
Python RESTful webservices with Python: Flask and Django solutionsSolution4Future
Slides contain RESTful solutions based on Python frameworks like Flask and Django. The presentation introduce in REST concept, presents benchmarks and research for best solutions, analyzes performance problems and shows how to simple get better results. Finally presents soruce code in Flask and Django how to make your own RESTful API in 15 minutes.
Typescript is a typed superset of JavaScript that adds additional features like classes, interfaces, and modules to provide type safety and help manage large applications. It allows for type annotations, classes, interfaces, generics and other features to support object-oriented and modular programming. Typescript code compiles to plain JavaScript and is an open source project maintained by Microsoft.
React Hooks are functions that allow you to "hook into" React state and lifecycle features from function components. Some key hooks include useState, useContext, and useEffect. Hooks make it easier to reuse stateful logic between components and simplify component logic. However, hooks should only be called from React functions and not in loops, conditions, or nested functions. Overall, hooks provide more powerful features to function components and opportunities to write code in a more functional style.
Reproducible bioinformatics for everyone: Nextflow & nf-corePhil Ewels
Slides from my talk at the Karolinska Institute in Huddinge (Stockholm, Sweden). June 2022.
General introduction to Nextflow and nf-core, covering what they are and why you should use them!
ASP.NET MVC is a framework from Microsoft that separates an application's logic, presentation, and data access into three distinct components: models, views, and controllers. This separation of concerns makes the application easier to manage, test, and develop for large teams. ASP.NET MVC uses friendly URLs, does not rely on view state or server-based forms, and supports test-driven development better than traditional ASP.NET Web Forms applications.
ECMAScript is the name of the international standard that defines JavaScript. ES6 → ECMAScript 2015. Latest ECMAScript version is ES7 which is ECMAScript 2016.
Basically it is a superset of es5
Protocol Buffers are a language-neutral, platform-neutral way of serializing structured data. They were developed at Google to address issues with encoding structured data for communication between systems. Protocol Buffers define the data structure in a .proto file, which is then used to generate code for easily reading and writing the structured data in multiple languages. They provide a smaller data size and faster parsing than XML and allow the data structure to be updated while maintaining backwards and forwards compatibility.
Kafka Summit NYC 2017 - Singe Message Transforms are not the Transformations ...confluent
Single message transformations allow lightweight modifications to individual messages as they are ingested or emitted by Kafka Connect connectors. Some key uses of single message transformations include data masking, event routing, event enhancement, and partitioning. They involve simple, message-at-a-time transformations configured through properties rather than writing complex code. Kafka Streams is better suited for more complex transformations like aggregations, joins, and windowing where the transformed data is stored back in Kafka.
Building robust CDC pipeline with Apache Hudi and DebeziumTathastu.ai
We have covered the need for CDC and the benefits of building a CDC pipeline. We will compare various CDC streaming and reconciliation frameworks. We will also cover the architecture and the challenges we faced while running this system in the production. Finally, we will conclude the talk by covering Apache Hudi, Schema Registry and Debezium in detail and our contributions to the open-source community.
The document discusses key features of ECMAScript 6 (ES6), including:
- Default parameters, template literals, multi-line strings, spread operator, and enhanced object literals which add concise syntaxes.
- Arrow functions which provide a shorter syntax for writing anonymous functions.
- Block-scoped constructs like let and const that add block scoping to variables and constants.
- Classes which provide a cleaner way to define constructor functions and objects.
- Hoisting differences between function declarations and class declarations.
- Using ES6 today by compiling it to ES5 using a tool like Babel.
Using Grafana with InfluxDB 2.0 and Flux Lang by Jacob LisiInfluxData
Flux, the new InfluxData data scripting and query language (formerly IFQL), super-charges queries both for analytics and data science. Jacob Lisi from Grafana Labs will give a quick overview of the language features as well as the moving parts for a working deployment. Grafana is an open source dashboard solution that shares Flux’s passion for analytics and data science. For that reason, they are very excited to showcase the new Flux support within Grafana, and a couple of common analytics use cases to get the most out of your data.
In this InfluxDays NYC 2019 talk, Jacob Lisi will share the latest updates they have made with their Flux builder in Grafana.
The document provides an introduction to ASP.NET Web API and discusses key concepts related to web services and HTTP including:
1. Web API allows exposing data and services to different devices by taking advantage of full HTTP features like URIs, headers, caching, and supporting various content formats like XML and JSON.
2. SOAP and HTTP are common protocols for implementing web services, with SOAP using HTTP and XML for serialization and HTTP serving as a more lightweight alternative supporting any content over the protocol.
3. Key HTTP concepts discussed include requests, responses, status codes, headers, and the stateless nature of the protocol, with HTTP providing a standard for communication between client and server applications.
How to Avoid Common Mistakes When Using Reactor NettyVMware Tanzu
The document discusses common mistakes when using Reactor Netty including logging, memory leaks, timeouts, connection closed issues, and connection pools. It provides examples of logging output that show a request-response lifecycle and handling of multiple concurrent connections. The presentation covers configuring logging, avoiding object retention, setting response timeouts, handling closed connections, and sizing connection pools properly.
This document provides an overview of ASP.NET Core, including:
1. ASP.NET Core is a cross-platform framework for building modern cloud-based web applications using .NET that can run on Windows, Linux, and Mac OS.
2. It is designed to be modular and include only necessary packages, making it faster and lighter weight than previous ASP.NET frameworks. It also supports dependency injection and inversion of control out of the box.
3. The project structure for an ASP.NET Core application includes folders for wwwroot (for static files), Properties (for settings), and Dependencies (for NuGet and client-side packages). Configuration is done through the Program.cs and Startup
Building production websites with Node.js on the Microsoft stackCellarTracker
Node.js on Windows, in production, may not be the most common configuration – but it’s immensely powerful with the help of edge.js, iisnode, and other open source projects. In fact, it’s a great tool for building highly performant, scalable front- and back-end websites on the Microsoft stack (IIS, .NET, SQL Server, etc).
In this talk, I’ll share some details, tips-and-tricks, and experiences building a production website on Windows, using CellarTracker – the world’s largest collection of community wine reviews and tools for cellar management – as an example.
Scaling asp.net websites to millions of usersoazabir
This document discusses various techniques for optimizing ASP.NET applications to scale from thousands to millions of users. It covers topics such as preventing denial of service attacks, optimizing the ASP.NET process model and pipeline, reducing the size of ASP.NET cookies on static content, improving System.net settings, optimizing queries to ASP.NET membership providers, issues with LINQ to SQL, using transaction isolation levels to prevent deadlocks, and employing a content delivery network. The overall message is that ASP.NET requires various "hacks" at the code, database, and configuration levels to scale to support millions of hits.
This document discusses Node.js, a JavaScript runtime built on Google's V8 engine that handles asynchronous processing through events and a reactor pattern. It provides an example of a simple HTTP server in Node.js code. The document argues that Node.js is well suited for handling concurrent requests and streaming data due to its asynchronous model. However, it notes that Node.js is not a full web framework and may not be a direct replacement for Rails. It also describes a use case for a custom analytics tracer application that would require handling many concurrent requests.
This document provides an overview of topics that will be covered at a Microsoft Dev Camp in 2015. The topics include introductions to ASP.NET, Visual Studio web tools, ASP.NET Web API, building real-time web applications with SignalR, and Azure services. Sessions will cover web front-end development, ASP.NET updates, consuming and building Web APIs, and real-world scenarios for scaling, updating, and deploying applications on Azure.
Node.js is well-suited for applications that require lightweight concurrency and asynchronous I/O. It uses an event-driven, non-blocking model that makes it efficient for real-time applications with high concurrency needs, such as chat, live data feeds, and web site monitoring dashboards. While Node.js performs well for lightweight operations, heavier CPU-intensive tasks may be better suited for Java/J2EE due to its multi-threading capabilities. The Node.js ecosystem is growing rapidly but still less mature than Java/J2EE's established ecosystem.
This document provides an overview of the MEAN stack and demonstrates how to build a sample application with it. It begins with defining each component of the MEAN stack: MongoDB as the database, Express as the web application framework, AngularJS for the frontend framework, and Node.js as the runtime environment. It then demonstrates setting up a basic Express app, integrating authentication with Passport, and interacting with MongoDB using Mongoose. The document also discusses key concepts like asynchronous I/O in Node.js and model-view-controller patterns in AngularJS. Overall, it serves as a high-level introduction to the technologies that make up the MEAN stack.
Revolutionizing the Data Abstraction Layer with IBM Optim pureQuery and DB2Vladimir Bacvanski, PhD
Vladimir Bacvanski and Dan Galvin
Looking for a more flexible and efficient way for Java programs to access the database? Join us as we explore how you can
bridge the gap between Java and relational databases. Enhance your Java environment with access layer generation, data
access best practices, traceability between Java packages and SQL statements, improved impact analysis and more. And most importantly, see how new technology can improve not only new development, but existing applications as well. Be prepared to
see designs and code samples!
This document provides an overview of SQLite, including:
- SQLite is an embedded SQL database that is not a client-server system and stores the entire database in a single disk file.
- It supports ACID transactions for reliability and data integrity.
- SQLite is used widely in applications like web browsers, Adobe software, Android, and more due to its small size and not requiring a separate database server.
- The Android SDK includes classes for managing SQLite databases like SQLiteDatabase for executing queries, updates and deletes.
This document summarizes new features in .NET Framework 4.5, including improvements to WeakReferences, streams, ReadOnlyDictionary, compression, and large objects. It describes enhancements to server GC, asynchronous programming, the Task Parallel Library, ASP.NET, Entity Framework, WCF, WPF, and more. The .NET 4.5 update focuses on performance improvements, support for asynchronous code and parallel operations, and enabling modern app development patterns.
This document provides an overview of key concepts for integrating IIS and ASP.NET, including HTTP modules, handlers, the virtual path provider, URL rewriting, response filters, and the configuration runtime API. It discusses how requests are processed, the role of identities, and practical uses of these techniques.
The document provides an introduction to ASP.NET MVC, including:
- ASP.NET MVC helps reduce complexity by dividing an application into three layers: Model, View, and Controller. This separation of concerns improves maintainability and supports test-driven development.
- The Model layer represents core business logic and data. The View layer transforms models into visual representations. The Controller layer processes user input and coordinates between the view and model.
- Razor is a new view engine that uses a code-focused templating syntax to generate HTML in an expressive and fluid way within ASP.NET MVC applications.
- Entity Framework Code First allows defining data models as classes and using them with EF without explicit mapping,
This document summarizes strategies for scaling a Ruby on Rails application. It discusses starting with shared hosting and moving to dedicated servers, scaling the database horizontally using replication or clustering, scaling the web servers by adding more application servers behind a load balancer, implementing user clusters to shard user data, adding caching at various levels using solutions like Squid, Memcached, and fragment caching, and using elastic cloud architectures on services like Amazon EC2. The key steps are horizontal scaling of databases, vertical and horizontal scaling of application servers, implementing user sharding and caching to optimize performance, and using elastic cloud services for on-demand scaling.
Sherlock Homepage - A detective story about running large web services - WebN...Maarten Balliauw
The site was slow. CPU and memory usage everywhere! Some dead objects in the corner. Something terrible must have happened! We have some IIS logs. Some traces from a witness. But not enough to find out what was wrong. In this session, we’ll see how effective telemetry, a profiler or two as well as a refresher of how IIS runs our ASP.NET web applications can help solve this server murder mystery.
Vaadin - Rich Web Applications in Server-side Java without Plug-ins or JavaSc...Joonas Lehtinen
The Vaadin provides a desktop-like programming model on the server for creating Rich Internet Applications (RIAs) in plain Java - without the need for HTML, XML, plug-ins or JavaScript.
Session explains the key concepts of the server-side RIA development model and compares it to client-side RIA. To demonstrate the use of framework, an example application is developed during the session step-by-step. The presentation is concluded with pointers on how to start developing your own applications with Apache-licensed Vaadin-framework.
You'll learn:
* How to create a desktop like web application in Java
* Difference between page oriented, client-side RIA and server-side RIA architectures
* How Vaadin can be extended with Google Web Toolkit
More information and materials about the presentation:
http://vaadin.com/web/joonas/wiki/-/wiki/Main/Server-side%20RIA
Real World Single Page App - A Knockout Case Studyhousecor
This presentation explores lessons learned from building a highly complex single page application that's used by 100's of automotive dealerships to finance and sell cars. We’ll walk through how to manage a pure client-side application with 1000’s of lines of custom JavaScript and review how Web API, Knockout, Durandal, RequireJS, KendoUI, and surprisingly little jQuery can join forces to make the browser sing. You’ll gain a clear understanding of when a single page app approach makes sense and learn how to pragmatically divide responsibilities between the client and server. This session will give you an appreciation for how far you can push ultra-responsive client-side rendering in the real-world.
Drizzle Keynote at the MySQL User's ConferenceBrian Aker
Drizzle MicroKernel aims to provide a database with further ease of use by focusing on modern applications and the web. It uses an open source methodology with everything in the codebase being public. The highlights include having over 80 code contributors from 4 companies, 41 language translations, and passing all test cases, though upgrades still require reloading and replication is still under testing. Rackspace has committed to using Drizzle in its cloud platform to help it succeed for both their needs and the community.
Integrate MongoDB & SQL data with a single REST APIEspresso Logic
Webinar slides. Describes how you create a backend application, in the cloud or on premise, that join data from MongoDb and SQL databases with a single RESTful API.
SharePoint 2010 Boost your farm performance!Brian Culver
This document provides an overview of how to boost performance in SharePoint. It discusses measuring and improving infrastructure, hardware, SharePoint farm, search and authentication performance. Specific techniques covered include list view throttling, performance throttling, caching, IIS optimizations, and using the developer dashboard. Testing tools like Fiddler and the Visual Studio test suite are also recommended. The goal is to understand performance bottlenecks and optimize the farm to support the required requests per second.
This document provides an overview of ASP.net MVC, including:
- ASP.net MVC is based on the Model-View-Controller pattern which separates application logic, UI, and data access for better organization and testability.
- MVC frameworks like Rails, Django, and ASP.net MVC itself use MVC to provide routing, controllers that interact with models and pass data to views, and views that are responsible for output.
- ASP.net MVC controllers direct requests, interact with models to retrieve data, and send data to appropriate views, separating concerns compared to traditional ASP.net.
How RPA Help in the Transportation and Logistics Industry.pptxSynapseIndia
Revolutionize your transportation processes with our cutting-edge RPA software. Automate repetitive tasks, reduce costs, and enhance efficiency in the logistics sector with our advanced solutions.
Best Practices for Effectively Running dbt in Airflow.pdfTatiana Al-Chueyr
As a popular open-source library for analytics engineering, dbt is often used in combination with Airflow. Orchestrating and executing dbt models as DAGs ensures an additional layer of control over tasks, observability, and provides a reliable, scalable environment to run dbt models.
This webinar will cover a step-by-step guide to Cosmos, an open source package from Astronomer that helps you easily run your dbt Core projects as Airflow DAGs and Task Groups, all with just a few lines of code. We’ll walk through:
- Standard ways of running dbt (and when to utilize other methods)
- How Cosmos can be used to run and visualize your dbt projects in Airflow
- Common challenges and how to address them, including performance, dependency conflicts, and more
- How running dbt projects in Airflow helps with cost optimization
Webinar given on 9 July 2024
Comparison Table of DiskWarrior Alternatives.pdfAndrey Yasko
To help you choose the best DiskWarrior alternative, we've compiled a comparison table summarizing the features, pros, cons, and pricing of six alternatives.
Support en anglais diffusé lors de l'événement 100% IA organisé dans les locaux parisiens d'Iguane Solutions, le mardi 2 juillet 2024 :
- Présentation de notre plateforme IA plug and play : ses fonctionnalités avancées, telles que son interface utilisateur intuitive, son copilot puissant et des outils de monitoring performants.
- REX client : Cyril Janssens, CTO d’ easybourse, partage son expérience d’utilisation de notre plateforme IA plug & play.
Kief Morris rethinks the infrastructure code delivery lifecycle, advocating for a shift towards composable infrastructure systems. We should shift to designing around deployable components rather than code modules, use more useful levels of abstraction, and drive design and deployment from applications rather than bottom-up, monolithic architecture and delivery.
Details of description part II: Describing images in practice - Tech Forum 2024BookNet Canada
This presentation explores the practical application of image description techniques. Familiar guidelines will be demonstrated in practice, and descriptions will be developed “live”! If you have learned a lot about the theory of image description techniques but want to feel more confident putting them into practice, this is the presentation for you. There will be useful, actionable information for everyone, whether you are working with authors, colleagues, alone, or leveraging AI as a collaborator.
Link to presentation recording and transcript: https://bnctechforum.ca/sessions/details-of-description-part-ii-describing-images-in-practice/
Presented by BookNet Canada on June 25, 2024, with support from the Department of Canadian Heritage.
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsMydbops
This presentation, delivered at the Postgres Bangalore (PGBLR) Meetup-2 on June 29th, 2024, dives deep into connection pooling for PostgreSQL databases. Aakash M, a PostgreSQL Tech Lead at Mydbops, explores the challenges of managing numerous connections and explains how connection pooling optimizes performance and resource utilization.
Key Takeaways:
* Understand why connection pooling is essential for high-traffic applications
* Explore various connection poolers available for PostgreSQL, including pgbouncer
* Learn the configuration options and functionalities of pgbouncer
* Discover best practices for monitoring and troubleshooting connection pooling setups
* Gain insights into real-world use cases and considerations for production environments
This presentation is ideal for:
* Database administrators (DBAs)
* Developers working with PostgreSQL
* DevOps engineers
* Anyone interested in optimizing PostgreSQL performance
Contact info@mydbops.com for PostgreSQL Managed, Consulting and Remote DBA Services
Coordinate Systems in FME 101 - Webinar SlidesSafe Software
If you’ve ever had to analyze a map or GPS data, chances are you’ve encountered and even worked with coordinate systems. As historical data continually updates through GPS, understanding coordinate systems is increasingly crucial. However, not everyone knows why they exist or how to effectively use them for data-driven insights.
During this webinar, you’ll learn exactly what coordinate systems are and how you can use FME to maintain and transform your data’s coordinate systems in an easy-to-digest way, accurately representing the geographical space that it exists within. During this webinar, you will have the chance to:
- Enhance Your Understanding: Gain a clear overview of what coordinate systems are and their value
- Learn Practical Applications: Why we need datams and projections, plus units between coordinate systems
- Maximize with FME: Understand how FME handles coordinate systems, including a brief summary of the 3 main reprojectors
- Custom Coordinate Systems: Learn how to work with FME and coordinate systems beyond what is natively supported
- Look Ahead: Gain insights into where FME is headed with coordinate systems in the future
Don’t miss the opportunity to improve the value you receive from your coordinate system data, ultimately allowing you to streamline your data analysis and maximize your time. See you there!
An invited talk given by Mark Billinghurst on Research Directions for Cross Reality Interfaces. This was given on July 2nd 2024 as part of the 2024 Summer School on Cross Reality in Hagenberg, Austria (July 1st - 7th)
Choose our Linux Web Hosting for a seamless and successful online presencerajancomputerfbd
Our Linux Web Hosting plans offer unbeatable performance, security, and scalability, ensuring your website runs smoothly and efficiently.
Visit- https://onliveserver.com/linux-web-hosting/
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Erasmo Purificato
Slide of the tutorial entitled "Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Emerging Trends" held at UMAP'24: 32nd ACM Conference on User Modeling, Adaptation and Personalization (July 1, 2024 | Cagliari, Italy)
INDIAN AIR FORCE FIGHTER PLANES LIST.pdfjackson110191
These fighter aircraft have uses outside of traditional combat situations. They are essential in defending India's territorial integrity, averting dangers, and delivering aid to those in need during natural calamities. Additionally, the IAF improves its interoperability and fortifies international military alliances by working together and conducting joint exercises with other air forces.
20. A better “user experience”: responsive web application
1.
System can respond to many concurrent
2.
requests
We can do more things in a single requests:
3.
richer web applications
21. JetBrains dotTrace
Run as Administrator
IIS worker process: set CPU affinity to a single
CPU
24. Expression link
Html.BuildUrlFromExpression<AccountController>(a => a.UserHome(username))
Name the action and the controller
Url.Action(quot;UserHomequot;, quot;Accountquot;, new {username = username})
Name the route
Url.RouteUrl(quot;Userquot;, new { username = quot;joeuserquot; })
Brute force
string.Format(quot;User/{0}quot;, Url.Encode(username))
31. Pass data in a RouteValueDictionary!
Syntax isn’t nearly as nice, but is it worth it?
32. Time for 200 links [ms]
390,0 (!)
20
18
16
13.6
14
12 9.8
10
7.2
8
6 3.8
4
2
0
Expression ction, anonymous Action, dictionary anonymous object dictionary
A class Route, Route,
As speed increases, so does the syntax and maintenance overhead!
33. Results:
8 requests / second => 25.5 requests / second
Replace anonymous classes with
RouteValueDictionaries:
25.5 requests / second => 27 requests / second
35. Deffered evaluation
The expression gets transformed into SQL only
when we call such a method that demands data for
its work.
These transformations get cached inside the
DBContext. Web applications can’t share
contexts, so there is no effective caching
getting done.
37. Compile the expression tree into an SQL
query and mapping methods. Store them as a
function that is thread-safe and accepts a
DBContext and query parameters.
42. A lot of overhead source code. Uncompiled
LINQ-SQL queries are terse, these just aren’t.
Black magic – the original query won’t always
work as-is. Exceptions from within LINQ-SQL
that you can’t really debug.
A compiled query has to always be called with
the same instance of
DataLoadOptions, otherwise it fails!
43. Simple generic, lambda syntax for queries
parameters: only for up to three parameters!
Otherwise you’ll need to declare a class for
parameters.
44. Results:
25 requests / second => 52 requests / second
The difference isn’t as big as in real-world
projects: we don’t have a lot of parameters
for queries and the expressions are simple.
45. RenderPartial gets called 41 times from the Index
view! Let’s optimize that by passing the
enumeration to the view itself.
Somewhat defeats partial view’s intended usage, but...
46. 41 calls to RenderPartial => three calls.
Results:
52 requests / second => 61.5 requests / second
47. URLs for MVC applications are typically
static: they don’t change depending on the
user/session/request.
Let’s cache them!
We wrote our own caching API that uses
ASP.NET’s builtin memory cache.
48. Extend ASP.NET MVC’s UrlHelper into UrlHelperCached, add
new cached methods for Action links.
Join all of data for a single link (action, controller, data) into a
string and use that as the cache key.
49. UrlHelper doesn’t implement an interface and it’s methods
aren’t virtual. We’ll add our own UrlHelperCached as a new
UrlCached property by extending MVC’s classes:
MasterPage, ViewPage, ViewUserControl.
50. Usage: inherit our View class in view’s definition
and replace Url with UrlCached. That’s all!
51. Results:
61.5 requests / second => 76 requests / second
Real-world: as routing table gets longer and
more parameters get passed around, the
difference is even greater!
52. We can cache site statistics.
Here’s our little caching API that uses lambda
syntax for cached values. A lot less code!
53. Cache stats and top voted news of all time:
76 requests/ second => 153 requests/ second.
Let’s also cache the main news display:
153 requests/ second => 400 requests / second.
Caching all DB data foregoes any SQL-LINQ or SQL
connection initialization. Even less overhead with
much faster response times.
54. Core2 Duo 2.53GHz, 4GB RAM, IIS7 Optimization only Data caching
450 400
Requests per second
400
350
300
250
200 153
150
76
61.5
100 52
27
25.5
50 8
0
55. Each of these optimization methods is in
production: fast URL generation, compiled
queries, URL caching, data caching.
The first alpha version
without any optimizations
ran at ~3 requests / second.
Today, the index page can
withstand ~800
requests/second on a
development webserver with
real world DB data. HTTP
concurrency = 8.
56. After a few uncomfortable moments of silence...
Questions?
57. Ideas for ASP.NET MVC developers:
Smarter view compiling. Let’s inline partial code
for views. Or let’s write a new view engine.
RenderPartials() method that accepts an
enumeration and can also use a spacer view – like
RoR.
Builtin URL caching – why not? Or at least make
interfaces for HTML and URL helpers.
58. Thanks to Simone Chiaretta for discovering a gross oversight
on my part: I’ve done my benchmarks with ASP’s debug
mode turned on. With regards to ASP.NET MVC 1.0, this
disables its view engine’s internal cache for resolved paths to
views. This makes specifying full paths to view irrelevant as
far as performance is considered.
So, the following change won’t yield any performance yield
with the debug attribute set to false
(Web.config, compilation section).
59. All of the benchmarks have been re-run with debug turned
off, the change before any optimizations have taken
place is significant (6 req/s to 8 req/s). Any other
changes to the performance due to the release mode
other than view path resolving were basically non-
existing or within the margin of error.
You can read Simone’s post at
http://codeclimber.net.nz/archive/2009/04/22/how-to-improve-
htmlhelper.renderpartial-performances-donrsquot-run-in-debug-mode.aspx
And, of course, run your production websites in
release mode. :)