I have a a directive which renders table cell(see how the way I'm compiling it here, basically using $compile inside link fn Angular.js directive template using variable from parent/inherited scope), now this is used inside two ng-repeats, one for rows, one for columns, so it's basically
<ng-repeat row in rows>
<ng-repeat column in columns>
<my-cell-directive />
</ng-repeat>
</ng-repeat>
with 50 rows and 8 columns its got a pretty big(well pretty noticeable anyway) impact on (rendering) performance.
So I was looking for a way to improve it. Firstly I tried to get rid of that inner repeat for columns, creating a my-cols-directive which internally iterates over columns, find their template, create one string(with those 8 columns inside) and then compiles it. Which lowered amount of compiling from 400 to 50. But it didn't really have noticeable improvement on rendering(well it did, but only about 15%).
Now my other idea was to reduce it to only one compile somehow, basically compiling it in the first iteration of ng-repeat, then saving(caching) the compiled result so the directive would then use this instead of compiling it over and over again, just replacing binding values with ones from the current iteration.
Would it be possible somehow? Or is there any other way to improve rendering speed?