Archives For Performance

What are Prepared Statements?

Prepared Statements, also known as parameterized statements, is a database feature that allows the same or similar queries to be executed with more efficiency and greater security. It has also been a common Sugar platform feature request for some time.

A prepared statement looks something like this:

SELECT * FROM table WHERE id = ?

As you can see, a prepared statement is basically a SQL template that allows you to identify parameters that can be bound later. The database engine can parse, optimize, and cache this statement without executing it.

This reduces the overhead associated with parsing complex queries that are used frequently by applications like Sugar. For example, you can imagine that List View queries would benefit from prepared statements since they are often complex and executed each time a list is displayed, searched, filtered, or paginated. With prepared statements, the database will do less work each time one of these actions is repeated.

Continue Reading…

Sugar Performance Engineer Vadzim Ramanenka shares some tips for profiling Sugar code using our newly launched SugarCRM XHProf Viewer open source project.

Profiling Sugar softly

Whenever you encounter that something is not working as fast as you would like, you need a way to look “under the hood” and understand what exactly is slowing things down. Sugar 7.7.0 added a built-in capability to collect detailed performance profiling data and store it in files. Recently, we released an open source SugarCRM XHProf Viewer project which can be used to visualize performance bottlenecks.

XhprofCallGraph.png

Example of a XHProf call graph diagram

Read on to learn how to configure both Sugar and the Viewer in a few simple steps.

Continue Reading…

At SugarCRM, we have been accelerating the rate at which we share technology with the Sugar Developer community. Back in June at UnCon, we shared more open source code examples and tools than ever before. In April, we announced Sucrose Charts and the Sugar REST Harness. I am pleased to announce that we have open sourced three more projects under the Apache-2 license!

Continue Reading…

Sugar and older versions of PHP

The latest version of PHP that Sugar 6.5 supported was PHP 5.3 which was released back in 2009. That is a long time ago folks. A sizable portion of the Sugar Developer community was in grade school back when PHP 5.3 was cool.

While we like to keep Sugar on the cutting edge, we have not been able to keep up to date with the latest PHP release. We have needed to maintain an upgrade path in each new Sugar release for customers still on Sugar 6.5. That is, up until now.

PHP Support matrix

As of Sugar 7.7.1 release:

Sugar version  Supported PHP versions
 6.5.x   5.2   5.3
 7.6.x   5.3   5.4
 7.7.0   5.3   5.4   5.5
 7.7.1   5.3   5.4   5.5   5.6

We do not plan on supporting 4 different versions of PHP forever, so you can expect to see support for older versions of PHP, such as PHP 5.3, to be dropped in upcoming Sugar releases.

For the complete and up-to-date reference of supported PHP versions, please view our Supported Platforms documentation.

Read on to learn more about why you should upgrade.

Continue Reading…

To coincide with the release of Sugar 7.7, the Engineering team has released updated versions of Unit Tests and Performance tools.

Requesting access to Sugar Test Tools

Sugar Test Tools are in private Github repositories within the SugarCRM Github organization. Requesting to have your Github account added to the SugarCRM Github organization is easy, just fill out this form.  Visit the Developer Tools section of this site to learn more.

Continue Reading…

Subpanel Creep

The Subpanels section is where you find related records for the current displayed Sugar record. This is a vital feature because it allows a user to get a unified view of all the CRM records related to a particular record.  Who are the Contacts associated with the Account? When is the last time I talked to this Customer?  These answers are typically found within the subpanel section.

Screen Shot 2016-02-26 at 3.50.46 PM

A very common customization in Sugar is to create new Custom Modules or to add new types of relationships between existing modules in the CRM.  For example, at SugarCRM we use Sugar to track Sugar Subscriptions within a custom module.  These Sugar Subscriptions are related back to the Account record for each and every customer we have. So there is a Subscriptions subpanel that appears on every Account record for this relationship.

Module relationships and even custom subpanels are slowly added over time to every Sugar instance – but rarely does anybody go back and remove them. This can cause problems since every subpanel has a cost associated with it.

Each subpanel is populated via an API request that queries additional database tables. Also each subpanel adds weight to the client user interface with additional HTML and JavaScript objects associated with them. If you have 15, 20, or more subpanels on your modules then opening a single record can generate a lot of overhead as these panels are rendered and are populated.

Performance is a priority at SugarCRM Engineering. So it was necessary for us to tackle this common issue head on.

Continue Reading…

Sugar Engineering is proud to announce the Beta release of the open source Sidecar Debugger Tools project!

Sidecar Debugger Tools

This project was developed as part of the recent Partner hack week where it was a crowd favorite.  Not only is this a great developer tool for debugging and building Sugar Sidecar components, it is also useful as a learning tool for understanding the components on each page and how views, fields, and layouts work together.

It is a Chrome Developer Tools extension that adds a SugarDebug tab into your Developer Tools panel.  And it’s loaded with features that will help you build Sidecar components faster and make debugging issues easier!

It’s easy to install!  Just follow the steps on the project README.

Continue Reading…