Jenosan

Monday, June 06, 2011

Using spatial feature to improve the performance of your Google map applications

Hi Guys ,

There are many ways to improve the performance of Google map application. Some of them are
1. Display only visual overlays
2.Marker clustering and polygon and polyline simplication
3.Use tile server
4.caching
5.Use Spatial features of your database
6. ....

Here i am going discussing about how to use spatial features of your database to improve the performance
1. Store Marker's location of lat,lng as native Point type
2. Store Polyline's   lat,lng as native LineString type
3. Store Polygon's region as native native Polygon type.

Saturday, May 07, 2011

StyleSheet @ top


We discovered that moving stylesheets to the document HEAD makes pages appear to be loading faster. This is because putting stylesheets in the HEAD allows the page to render progressively.
Front-end engineers that care about performance want a page to load progressively; that is, we want the browser to display whatever content it has as soon as possible. This is especially important for pages with a lot of content and for users on slower Internet connections. The importance of giving users visual feedback, such as progress indicators, has been well researched and documented. In our case the HTML page is the progress indicator! When the browser loads the page progressively the header, the navigation bar, the logo at the top, etc. all serve as visual feedback for the user who is waiting for the page. This improves the overall user experience.
The problem with putting stylesheets near the bottom of the document is that it prohibits progressive rendering in many browsers, including Internet Explorer. These browsers block rendering to avoid having to redraw elements of the page if their styles change. The user is stuck viewing a blank white page.
The HTML specification clearly states that stylesheets are to be included in the HEAD of the page: "Unlike A, [LINK] may only appear in the HEAD section of a document, although it may appear any number of times." Neither of the alternatives, the blank white screen or flash of unstyled content, are worth the risk. The optimal solution is to follow the HTML specification and load your stylesheets in the document HEAD.

JS @ the bottom

The problem caused by scripts is that they block parallel downloads. The HTTP/1.1 specification suggests that browsers download no more than two components in parallel per hostname. If you serve your images from multiple hostnames, you can get more than two downloads to occur in parallel. While a script is downloading, however, the browser won't start any other downloads, even on different hostnames


In some situations it's not easy to move scripts to the bottom. If, for example, the script uses document.write to insert part of the page's content, it can't be moved lower in the page. There might also be scoping issues. In many cases, there are ways to workaround these situations.


An alternative suggestion that often comes up is to use deferred scripts. The DEFER attribute indicates that the script does not contain document.write, and is a clue to browsers that they can continue rendering. Unfortunately, Firefox doesn't support the DEFER attribute. In Internet Explorer, the script may be deferred, but not as much as desired. If a script can be deferred, it can also be moved to the bottom of the page. That will make your web pages load faster.

Best Practices for New Websites


I have listed some best coding practices for modern web development
  • Make Fewer HTTP Requests
  • Use a Content Delivery Network
  • Add a Expires Header
  • Gzip Components
  • Avoid Redirects
  • Put Style sheets @ top
  • Put Script @ bottom
  • Avoid CSS Expression
  • Make JS and CSS external
  • Reduce DNS Lookups
  • Minimize JS
  • Remove Duplicate Scripts
  • Configure Entity Tags
  • Make AJAX cachealbe 

Monday, May 02, 2011

How to merge blogs

Hi Guys,

I have two blogs within the same account. So it is so hard time to manage both :)
So plan to merge together. If you guys having same pain

Here we go

Go to Settings----->Basic---->Blog Tools in one blog and click Export and save xml file to your media.
Then Go to Settings----->Basic---->Blog Tools in OTHER blog and click Import and choose same

Labels:

GTileOverlay on Google Map


Tile overlays are custom image/data that sit on top of an existing Google base map. The data/Image is cut into a pyramid of static tiles that correspond to each zoom level. Typically you would use some type of tool to cut the data into static tile images. In the figure below you see an example of a custom tile overlay showing AutoCAD map of university on top of a Google base map.



GTileOverlay is used when you want your data to overlay an existing Google Maps base map. In most cases you will want to use one of several tools available for creating the map tiles that will need to be displayed at each zoom level. GTileOverlay requires three abstract methods including getTileUrl(), isPng(), and getOpacity()

If you guys want more practical experience please play around this url http://npmap.np.edu.sg/

Labels: ,

Saturday, April 30, 2011

SQL Server parallel processing


SQL Server parallel processing

SQL Server provides parallel queries to optimize query execution and index operations for computers that have more than one microprocessor (CPU). Because SQL Server can perform a query or index operation in parallel by using several operating system threads, the operation can be completed quickly and efficiently

How Parallel Execution Works on SQL Server

SQL Server looks for queries or index operations that might benefit from parallel execution.For these queries, SQL Server inserts exchange operators into the query execution plan to prepare the query for parallel execution. An exchange operator is an operator in a query execution plan that provides process management, data redistribution, and flow control.

The exchange operator includes the Distribute Streams, Repartition Streams, and Gather Streams logical operators as subtypes, one or more of which can appear in the Showplan output of a query plan for a parallel query.

After exchange operators are inserted, the result is a parallel-query execution plan. A parallel-query execution plan can use more than one thread.The actual number of threads used by a parallel query is determined at query plan execution initialization and is determined by the complexity of the plan and the degree of parallelism. Degree of parallelism determines the maximum number of CPUs that are being used.

Degree of Parallelism in SQL Server

SQL Server automatically detects the best degree of parallelism for each instance of a parallel query execution or index data definition language (DDL) operation. It does this based on the following criteria:

Whether SQL Server is running on a computer that has more than one microprocessor or CPU, such as a symmetric multiprocessing computer (SMP).

Whether sufficient threads are available.

The type of query or index operation executed.

Whether there are a sufficient number of rows to process.

Whether current distribution statistics are available.

Labels: ,

Thursday, April 28, 2011

Tips for rendering Overlays on Google map

If there are more than thousands of Overlays (Markers, Polylines and Polygons) to be displayed on a Google map it starts to get slow due to browser javascript performance and network throughput limits. To maintain high performance, you can use the following techniques

  • Only the overlays that are to be shown in the current map are sent to the browser from backend
  • If the map is panned or zoomed, only the differences to the visible set are sent
  • Polylines and Polygons are clipped to the visible rectangle so that only the visible parts of the lines are sent
  • At lower zoom levels
Cluster markers are used in place of actual markers
Polylines and Polygons are simplified to reduce the number of points
  • At even lower zoom levels, 256 x 256 tile images are generated with the marker images, polyline sand polygons drawn on them.
  • These tiles are cached on disk once generated.

Tuesday, April 26, 2011

Top 10 Programming Languages 2010

Through the latest statistics by TIOBE index here is the table that show the ranking of the top 20 popular languages :




If you want to make a lot of money, but probably also work on very intense high-pressure projects where risk is often involved—as in a lot can go wrong—learn Objective-C. Objective-C borrows from Smalltalk and the C language, and it influenced the creation of Java. Objective-C is used primarily on Apple's Mac OS X and iOS. With the wild popularity of Apple's iPhone, iPod Touch and iPad, there are simply not enough Objective-C developers out there to meet the needs of users hungry for more apps for these devices. Objective-C ranked No. 9 on the most-recent TIOBE survey, but that is up from being No. 45 in the survey in June of 2009.

Google Moon and Mars

Hi Guys,

Here we go Moon and Mars
http://www.google.com/moon/
http://www.google.com/mars/

Google Moon is a service similar to Google Maps that shows satellite images of the moon.The landing site of each of the Apollo missions is shown on the satellite image,providing more information on each mission as the user zooms in.

Page Speed

Monday, April 25, 2011

Google map api v3 support over https

It is great news from Google map api development team. We can access the Maps JS api over HTTS, allowing us to utilize oue secure private data.
To load the Gmaps JS API v3 over HTTPS from following URl:


https://maps-api-ssl.google.com/maps/api/js?v=3&sensor=false


query string V is Googlemap api version and sensor is GPS locator to determine the user's location.