developer insights for application upgrade to coldfusion 2016

Post on 12-Jan-2017

52 Views

Category:

Technology

3 Downloads

Preview:

Click to see full reader

TRANSCRIPT

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Developer Insights for Application Upgrade to CF2016Himavanth Rachamsetty | Computer Scientist

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Out of the box

Applications – 30% faster

BlogCFC on CF11 vs CF2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Out of the box – Cached Queries

822%

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Out of the box …

File & List functions 65%

CFLoop 22%

Argument Validation 5%

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

ColdFusion 2016

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance through Application Upgrade

Arrays

Structs

Struct Serialization

Session Storage

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Application Upgrade – Sample Application

CFM pages getArts.cfm getArtists.cfm addArt.cfm

CFC getArts() getArtists()

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Application Upgrade – Sample Application

Utils.cfc

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance through Application Upgrade

Arrays

Structs

Struct Serialization

Session Storage

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Arrays

ArrayNew ( dimension); arrayNew (1);

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Arrays

ArrayNew ( dimension); arrayNew (1);

application.arts = arts;

ArrayNew(dimension, synchronized) arrayNew (1, false);

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Arrays

ArrayNew ( dimension); arrayNew (1);

application.arts = arts;

ArrayNew(dimension, synchronized) arrayNew (1, false);

Performance difference

93%

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Arrays

[“art1”,”art2”] and not [“art1”,”art2”,”NewArt”]

Solution 1

Solution 2

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Arrays

[“art1”,”art2”] and not [“art1”,”art2”,”NewArt”]

2500%

Solution 2

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance through Application Upgrade

Arrays

Structs

Struct Serialization

Session Storage

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Structs

Solution 1Solution 2

No order Ordered

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance through Application Upgrade

Arrays

Structs

Struct Serialization

Session Storage

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Struct Serialization

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance through Application Upgrade

Arrays

Structs

Struct Serialization

Session Storage

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Session Storage

This.sessionManagement = true;

Session.mySessionVariable = sessionData;

InMemory

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Session Storage - InMemory

Memory

Memory

Memory

Replication

Replication

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Session Storage - REDIS

REDIS

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance – Session Storage

Redis Session Storage

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Performance through Application Upgrade

Arrays (unsynchronized) - 93%

Arrays (pass by reference) - 2500%

Ordered Structs

Struct Serialization based on Metadata

REDIS Session Storage

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Other Benefits

PDF

Safe Navigation & DBVarName

Security Code Analyzer

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Other Benefits - PDF

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Other Benefits - PDF

<CFDocument format=“pdf” src=“https://www.infoq.com” />

CFDocument Original

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Other Benefits - PDF

<CFHTML2PDF source=“https://www.infoq.com” />

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Other Benefits - PDF

CFHTMLTOPDF

Original

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Other Benefits

PDF

Safe Navigation

Security Code Analyzer

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Cleaner Code

x = getX();

y = x.getY();

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Cleaner Code

x = getX();if( isDefined(“x”) )

y = x.getY();

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Cleaner Code – Safe navigation

x = getX();if( isDefined(“x”) )

y = x.getY();

VS

x = getX();y=x?.getY();

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Cleaner Code

x = getX();if( isDefined(“x”) ){

y = x.getY();if( isDefined(“y”) ){

z = y.getZ();if( isDefined(“z”) )

myData = z.getData();}

}

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Cleaner Code

x = getX();if( isDefined(“x”) ){

y = x.getY();if( isDefined(“y”) ){

z = y.getZ();if( isDefined(“z”) )

myData = z.getData();}

}

myData = x?.getY()?.getZ()?.getData();

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Cleaner Code – stored procedures

<CFSTOREDPROC PROCEDURE=“testProcedure"datasource=“testDatasource"><CFPROCPARAM type="In" cfsqltype="CF_SQL_VARCHAR" value="ONE"

> <CFPROCPARAM type="In" cfsqltype="CF_SQL_VARCHAR" value="TWO"

></CFSTOREDPROC>

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Cleaner Code – dbvarname

<CFSTOREDPROC PROCEDURE=“testProcedure"datasource=“testDatasource"><CFPROCPARAM type="In" cfsqltype="CF_SQL_VARCHAR" value="ONE"

dbvarname="@p_VarName1"> <CFPROCPARAM type="In" cfsqltype="CF_SQL_VARCHAR" value="TWO" dbvarname="@p_VarName2">

</CFSTOREDPROC>

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Other Benefits

PDF

Safe Navigation

Security Code Analyzer

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Security

Security Code Analyzer

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Better Security contd...

Security Code Analyzer

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Better Security contd...

Security Code Analyzer

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Benefits

Performance – Out of the Box

Performance – With Application Upgrade

Others (PDF, Safe Navigation, Security Code Analyzer)

© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.

Q & A

Thank Youhimar@adobe.com

top related