In our application at ControlPath, we have a pretty complex permission system. Well, imagine a permission system based off of a cyclical graph of 30,000 nodes with multiple levels of inheritance rules and you just begin to scratch the surface. I recently rewrote the permission rebuild caching system into recursive stored procedures. This improved performance from 45 minutes… to 45 seconds. There are a bunch of tricks I employed to get this kind of speedup, but today I am going to share 2 of the simplest ones with you… Continue reading
Author: Jason
ExtJS – QueryStore & Store Query Language
This is purely conceptual at this point but I would love to have this feature. It would be similar to TrimQuery but be based on Ext Stores. I would love to be able to do this:
1 2 3 4 5 6 7 8 9 |
var joinedStore = new Ext.data.QueryStore({ query: "SELECT p1.name as parentName, p2.name as childName, IF(p1.id=1,'parent','child') as relationshipType "+ "FROM relationship r "+ "JOIN people p1 ON (r.parentId = p1.id) "+ "JOIN people p2 ON (r.childId = p2.id) "+ "WHERE p1.id = 1 OR p2.id = 1" }); |
[Edit]
Let me preface this with the fact that this is NOT server side SQL. This SQL never gets sent to the server. This is a very simple client side implementation that is only used for joining together data from multiple stores into an intermediary store which is useful for displaying grids that don’t match your server side data model. It saves you from having to create one-off data providers for these grids and having to migrate changes to your other stores by hand.
[/Edit]
ExtJS State Management bug – (patch enclosed)
The ExtJS statemanager is broken, at least in version 2.1. Do not use it. The problem is that all components save their state even if stateful is set to false… which causes some interesting issues.
Bigger isn’t always better for MySQL
Fairly recently, I did some performance tuning on our MySQL servers and discovered some very interesting things. The previous “DBA” had the mantra of “set the value higher and it will go faster.” We are running some pretty beefy hardware so I can definitely see where this logic would come in to play. I became concerned when my little laptop with a default MySQL installation was getting better performance than our 8 gig of Ram, dual processor quad core monster server.
ExtJS Performance – Event Listener Cleanup
Its a pretty simple code snippet but the overarching topic, performance (especially in ExtJS), can be complicated and developers really need to be cognizant of performance impacts. Especially so when its running on the client which you have no control over the performance specs of the machine.
There has long been the problem in Ext with the issue of cleaning up event listeners after the listening component has been destroyed. Until now, developers have had to code custom destructors to handle this cleanup.
A blog… Finally!
I have been wanting to write a blog for quite a long time… it can’t be that hard right!?
My blog will be primarily focused on technical subjects revolving around web development and design. Currently, I am working heavily with Java, MySQL, and ExtJS so my posts will mostly revolve around those subjects. I am going to try and stay away from the beginner tutorial type things and stick with more advanced topics. There is enough of that out there already.
Take a look at the “About Me” page so you can get a better idea of… well… yes… me. (Sorry, I am really not that interesting)