The Flash traveling thru Space and Time, Stargate Portal, Wormhole
Thursday, December 14, 2017
ServiceStack is the future of Building Cross-Platform Web Services
ServiceStack is the current and future replacement to WCF, ASMX, MVC, MVC with Web API, Web API, SQL Server Web API, SQL Server HTTP Endpoints, Oracle Web Services, and other custom web service implementations for building cross-platform, client-agnostic, server-agnostic, web-service solutions. I have used RestSharp client and ServiceStack web-services (on the server side) to create cross-platform, technology independent, micro-services implementations. ServiceStack is AWESOME.
Thursday, March 3, 2016
SQL Server Index and Statistics Maintenance Scripts
SQL Scripts for index and statistics management which could help you manage SQL Server more efficiently and correctly. Click here
Thursday, April 4, 2013
Thursday, March 14, 2013
ContextSwitchDeadlock was detected
There is a bug in .NET RCW when frequently calling COM and/or COM+ components that use STA threading model. The fix is to use the code from here. In order to avoid the following error:
ContextSwitchDeadlock was detected
Message: The CLR has been unable to transition from COM context 0x16daf0 to COM context 0x16d8c8 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.Sunday, December 30, 2012
Wednesday, March 14, 2012
Tuesday, June 14, 2011
Fastest SQL Server Paging implementation
I found a great article that shows the fastest sql paging implementation. Click here to learn more.
Monday, January 25, 2010
Friday, January 22, 2010
10 ASP.NET Performance and Scalability Secrets
10 ASP.NET Performance and Scalability Secrets should implement for sites that require improved performance.
For additional information on improving ASP.NET Performance click here.
For additional information on improving ASP.NET Performance click here.
Thursday, January 21, 2010
JavaScript Closures
Javascript closures can cause memory leaks and should be used with care. Click here to learn more.
The pattern of public, private, and privileged members is possible because JavaScript has closures. What this means is that an inner function always has access to the vars and parameters of its outer function, even after the outer function has returned. There is no book currently available on JavaScript programming that shows how to exploit it.
For a good Javascript book click here.
Javascript closures:
The pattern of public, private, and privileged members is possible because JavaScript has closures. What this means is that an inner function always has access to the vars and parameters of its outer function, even after the outer function has returned. There is no book currently available on JavaScript programming that shows how to exploit it.
For a good Javascript book click here.
Javascript closures:
Managed Threading Best Practices
".NET Framework Developer's Guide" has important threading concepts for .NET development.
Managed Threading Best Practices can be found here.
Click Event-based Asynchronous Pattern Overview to read about even based asynchronous pattern and its implementation.
Additional threading info below:
Threads and Threading
The Managed Thread Pool
Exceptions in Managed Threads
Managed Threading Best Practices can be found here.
Click Event-based Asynchronous Pattern Overview to read about even based asynchronous pattern and its implementation.
Additional threading info below:
Threads and Threading
The Managed Thread Pool
Exceptions in Managed Threads
Wednesday, January 20, 2010
WPF Threads
Learn about how WPF handles threads. WPF now offers two UI threads. Click on WPF Threads
and WPF Threading Model to learn more....
and WPF Threading Model to learn more....
Memory Leaks with Delegates
When adding delegate (+=), you should remove it (-=) in order to release the delegate object and allow the GC to collect it. If a delegate maintains a reference to an externally declared object, and is not removed (-=), you will have a memory leak. For more details, click this article.
Monday, January 18, 2010
Inversion of Control Containers and the Dependency Injection pattern
Click on Inversion of Control Containers and the Dependency Injection pattern to learn more about Dependency Injection patterns.
Also, check out Create Elegant Code With Anonymous Methods, Iterators, And Partial Classes to learn elegant C# coding tips.
Also, check out Create Elegant Code With Anonymous Methods, Iterators, And Partial Classes to learn elegant C# coding tips.
Thursday, January 7, 2010
Improve Garbage Collector Performance using Finalize/Dispose pattern
After reading an article that demonstrated how to improve GC performance (i.e., maximize size of Gen 0, minimize Gen 1 and Gen 2), I will refer to the Dispose pattern documentation on Microsoft site. The GC article is a good starting point and can be complemented by reading the Garbage Collection chapter in the "CLR via C#" book (i.e., where you will learn that large objects get placed directly on Gen 2 and more details not mentioned in this GC article).
It is very important to understand and implement the Dispose pattern correctly. If you do not, your application may do mysterious things, and it will not be the GC fault.
For details about Garbage Collector internals and more, read CLR via C# book (note in Feb 2010, Third edition of this book will be released).
For improving performance of your .NET applications check out the Microsoft Patterns and Practices.
It is very important to understand and implement the Dispose pattern correctly. If you do not, your application may do mysterious things, and it will not be the GC fault.
For details about Garbage Collector internals and more, read CLR via C# book (note in Feb 2010, Third edition of this book will be released).
For improving performance of your .NET applications check out the Microsoft Patterns and Practices.
Monday, January 4, 2010
SQL Server 2005 - Performance optimization with DMV
After reading a very interesting article on SQL Server 2005 optimization with DMVs, I want to share a sql script to identify the indexes (in a specific database used) that are very logically fragmented (i.e., require rebuild or reorganization to improve performance of sql queries). See details below:
-----------------------------------------------------------------------
/*
------------------------------------------------------
Purpose: Identifying Most Logically Fragmented Indexes
------------------------------------------------------
Details:
------------------------------------------------------
Logical index fragmentation indicates the percentage
of entries in the index that are out of order.
This is not the same as the page-fullness type of fragmentation.
Logical fragmentation has an impact on any order scans
that use an index. When possible, this fragmentation should be removed.
This can be achieved with a rebuild or reorganization of the index.
You can identify the most logically fragmented indexes using
the sys.dm_db_index_physical_stats DMV, which
lets you view details about the size and fragmentation of indexes.
This is joined to the sys.indexes DMV,
which contains details used in the creation of the index.
This script identifies the most logically fragmented indexes.
The results, which are sorted by the percent of fragmentation,
show the most logically fragmented indexes, and the database/table.
------------------------------------------------------
*/
DECLARE @dbid int;
select @dbid = db_id();
SELECT
DatabaseName = DB_NAME()
,TableName = OBJECT_NAME(s.[object_id])
,IndexName = i.name
,[Fragmentation %] = ROUND(avg_fragmentation_in_percent,2)
INTO #TempFragmentation
FROM sys.dm_db_index_physical_stats(@dbid,null, null, null,'DETAILED') s
INNER JOIN sys.indexes i ON s.[object_id] = i.[object_id]
AND s.index_id = i.index_id
WHERE s.database_id = @dbid
AND i.name IS NOT NULL -- Ignore HEAP indexes.
AND OBJECTPROPERTY(s.[object_id], 'IsMsShipped') = 0
AND avg_fragmentation_in_percent > 1
ORDER BY [Fragmentation %] DESC;
SELECT *
INTO Admin.dbo.[Most Logically Fragmented Indexes]
FROM #TempFragmentation
ORDER BY [Fragmentation %] DESC;
DROP TABLE #TempFragmentation;
---------------------------------------------------------------------------
For more information, check out the white paper on Performance Tuning Waits Queues.doc
---------------------------------------------------------------------------
For SQL Server 2008 DMV views click here
-----------------------------------------------------------------------
/*
------------------------------------------------------
Purpose: Identifying Most Logically Fragmented Indexes
------------------------------------------------------
Details:
------------------------------------------------------
Logical index fragmentation indicates the percentage
of entries in the index that are out of order.
This is not the same as the page-fullness type of fragmentation.
Logical fragmentation has an impact on any order scans
that use an index. When possible, this fragmentation should be removed.
This can be achieved with a rebuild or reorganization of the index.
You can identify the most logically fragmented indexes using
the sys.dm_db_index_physical_stats DMV, which
lets you view details about the size and fragmentation of indexes.
This is joined to the sys.indexes DMV,
which contains details used in the creation of the index.
This script identifies the most logically fragmented indexes.
The results, which are sorted by the percent of fragmentation,
show the most logically fragmented indexes, and the database/table.
------------------------------------------------------
*/
select @dbid = db_id();
SELECT
DatabaseName = DB_NAME()
,TableName = OBJECT_NAME(s.[object_id])
,IndexName = i.name
,[Fragmentation %] = ROUND(avg_fragmentation_in_percent,2)
INTO #TempFragmentation
FROM sys.dm_db_index_physical_stats(@dbid,null, null, null,'DETAILED') s
INNER JOIN sys.indexes i ON s.[object_id] = i.[object_id]
AND s.index_id = i.index_id
WHERE s.database_id = @dbid
AND i.name IS NOT NULL -- Ignore HEAP indexes.
AND OBJECTPROPERTY(s.[object_id], 'IsMsShipped') = 0
AND avg_fragmentation_in_percent > 1
ORDER BY [Fragmentation %] DESC;
SELECT *
INTO Admin.dbo.[Most Logically Fragmented Indexes]
FROM #TempFragmentation
ORDER BY [Fragmentation %] DESC;
DROP TABLE #TempFragmentation;
---------------------------------------------------------------------------
For more information, check out the white paper on Performance Tuning Waits Queues.doc
---------------------------------------------------------------------------
For SQL Server 2008 DMV views click here
Wednesday, October 21, 2009
C# Threading Issues
I just discovered an interesting article on Threading, by Jeffrey Richter. Thread synchronization does not work for unboxed value types.
Thursday, May 14, 2009
WMV to FLV Video File Coverter links
flashvideoencoder/convertvideo.htm
http://www.flash-video-soft.com/flv-converter/
http://www.geovid.com/Video_to_Flash_Converterhttp://www.flash-video-mx.com/
online conversion tools
http://www.zamzar.com/
http://heywatch.com/page/home
http://media-convert.com/http://www.dvdvideosoft.com/products/dvd/Free-Video-to-Flash-Converter.htm
Tool for Purchase
http://www.aone-soft.com/wmv_mpeg_avi_to_flv_converter.htm
http://www.flash-video-soft.com/flv-converter/
http://www.geovid.com/Video_to_Flash_Converterhttp://www.flash-video-mx.com/
online conversion tools
http://www.zamzar.com/
http://heywatch.com/page/home
http://media-convert.com/http://www.dvdvideosoft.com/products/dvd/Free-Video-to-Flash-Converter.htm
Tool for Purchase
http://www.aone-soft.com/wmv_mpeg_avi_to_flv_converter.htm
Subscribe to:
Posts (Atom)
.jpg)
