Log of work done on Smart project
Fixed broken-building issue
The last major refactor and optimization to Smart had introduced an error which broke the building of a complex project C++ project cooperating with the LLVM source tree. I was able to identify and fix the issue, which had allowed the project to build correctly again.
Optimized files mapping speed
When the target project built with Smart contains a large number of files, it can take a long time to search for a particular file declared in files-map patterns. I was able to optimize the files searching speed by using a more efficient algorithm. This has made it much faster to find the files that I need.
Optimizing rule iteration using a cache mechanism
The Smart rules iteration is a recursive algorithm to iterate over the rules across multiple projects defined by many do.smart
files. This can be slow, especially for large projects. I am working on optimizing the rule iteration by using a cache mechanism. This will store the results of the recursive rule iteration in a cache so that it does not have to be re-computed each time. This should significantly improve the rule iteration speed.
This is something like what is popular as “dynamic programming". But I prefer considering it as a "dynamic lookup table" or "dynamic lookup dictionary" or "rule iteration cache" instead. The term "dynamic programming" can be confusing, because it sounds like it is related to programming languages; using a different term is more descriptive of the technique.
Next steps
- Continue optimizing the rule iteration using a cache mechanism.
- Investigate other ways to improve the performance of the Smart project.
- Document the changes that have been made.