Object Mapping Performance comparison between Glass and Synthesis
To test the performance of Object mapping we have tried to read the various number of Sitecore items using Glass mapper and Synthesis.
Below table shows the total time taken by both the ORM:
| Number of Sitecore Items Tested | Time taken by Glass Mapper (Milliseconds) | Time taken by Synthesis
(Milliseconds) |
Difference | |
| 1 | 54 | 176 | 86 | 90 |
| 2 | 54 | 79 | 46 | 33 |
| 3 | 54 | 84 | 62 | 22 |
| 4 | 554 | 87 | 67 | 20 |
| 5 | 554 | 88 | 53 | 35 |
| 6 | 554 | 120 | 65 | 55 |
| 7 | 5004 | 92 | 61 | 31 |
| 8 | 5004 | 103 | 60 | 43 |
| 9 | 5004 | 82 | 67 | 15 |
| 10 | 11450 | 103 | 54 | 49 |
| 11 | 11450 | 105 | 54 | 51 |
After looking into the above data it seems like Synthesis ORM is more faster than Glass mapper. The Time difference could be more if we will check with huge data since here I have only tested the Item with 1 field but if the Items have more content then definitely it will impact the performance.
I have also tried to add the Sitecore item using Synthesis and found that its much more faster than Glass mapper. very Quickly i was able to add more than 10000 items. Below code perform the Item Add:

while exploring the Synthesis I have observed the below few differences between Synthesis and Glass mapper:
| Glass Mapper | Synthesis | |
| 1 | It does not support the Modular Architecture | It support the Modular Architecture |
| 2 | One Class file contains the all Models for sitecore templates | We can generate component based Model file |
| 3 | It does not support the auto update of model if any template added or updated | Synthesis use “Synthesis.AutoRegenerate.config” file which update the respective models if any template get added/updated |
| 4 | Glass Mapper auto code generation is dependent on TDS/Unicorn | Synthesis has separate User interface page (synthesis.aspx) where we can regenerate the code. And it doesn’t depend on TDS/Unicorn |
| 5 | T4 templates are required to generate the code | Synthesis doesn’t need any T4 templates |


