Nesne-İlişkisel Eşleme (ORM) Araçlarının .NET 6 Ortamında Performans Analizi

Nesneye yönelik programlamada, Nesne-İlişkisel Eşleme (Object-Relational Mapping – ORM) araçları sıklıkla kullanılmaktadır. Yazılım geliştiricilerin ORM seçimi yaparken en önemli seçim kriterlerinden birisi bu araçların sağladığı performanstır. ORM araçları üzerine yapılan performans araştırmalarının çoğu işlem süresi ve Rastgele Erişimli Bellek (Random-Access Memory – RAM) kullanım bilgileriyle sınırlı kalmış, Merkezi İşlem Birimi (Central Processing Unit – CPU) kullanım bilgilerine yer verilmemiştir. Ayrıca literatürde, platform bağımsız ve açık kaynak olarak üretilen yeni nesil .NET platformu olan .NET 6 ortamında yapılmış bir ORM performans çalışmasına rastlanılmamıştır. Bu çalışmada, belirtilen eksikliği gidermek ve yazılım geliştiricilere yol göstermek için .NET 6 ortamında belirli ORM araçlarının performans analizi gerçekleştirilmiştir. Çalışmada, işlem süresi ve RAM kullanım bilgilerinin yanında CPU kullanım bilgileri de yer almaktadır. Bu çalışmada başlıca ORM araçlarından Dapper, NHibernate ve Entity Framework Core (EF Core) ile kayıt okuma, ekleme, güncelleme, silme, arama ve sıralama işlemleri gerçekleştirilerek, işlem süresi, RAM ve CPU kullanımının ölçülebileceği bir yazılım geliştirilmiştir. Yapılan ölçümler sonucunda işlem süresi açısından; okuma, silme, arama ve sıralama işlemleri için Dapper; ekleme ve güncelleme işlemleri için EF Core en iyi sonuçları vermiştir. Kaynak kullanımı açısından Dapper’ın en iyi performansa sahip olduğu, EF Core ile NHibernate araçlarının sıralamalarının ise kayıt sayısı ve işlem türüne göre kendi aralarında değiştiği sonucuna varılmıştır.

Performance Analysis of Object-Relational Mapping (ORM) Tools in .Net 6 Environment

ORM tools are frequently used in projects developed by object-oriented programming paradigm. Software developers generally look at the performances of these tools when they select an ORM tool. Most of the performance studies on ORM tools are limited to processing time and RAM usage information, and CPU usage information is not included. Moreover, no ORM performance study has been found in the literature, conducted in .NET 6, which is an open-source and platform-independent new generation .NET platform. In this study, to close the mentioned gap in the literature and guide the software developers, we conduct research for analyzing performances of certain ORM tools in .NET 6. Our study includes CPU usage information as well as processing time and RAM usage information. We develop a software for measuring processing time, RAM and CPU usage while performing read, insert, update, delete, search and sort operations with Dapper, NHibernate and Entity Framework Core (EF Core) ORM tools. As a result, while Dapper is best in terms of processing time for read, delete, search and sort operations, EF Core has the best results for insert and update operations. We conclude that Dapper has the best performance in terms of resource usage, while the rankings of EF Core and NHibernate vary among themselves according to the number of records and operation type.

___

  • A. Gruca, P. Podsiadlo, “Performance Analysis of. NET Based Object–Relational Mapping Frameworks”, 10th International Conference Beyond Databases, Architectures, and Structures (BDAS 2014), Ustron, Poland, 40-49, May 27-30, 2014.
  • S. M. Bhatti, Z. H. Abro, F. R. Abro, “Performance Evaluation of Java Based Object Relational Mapping Tool”, Mehran University Research Journal of Engineering and Technology, 32(2), 159–166, 2013.
  • M. Kopteff, “The Usage and Performance of Object Databases compared with ORM tools in a Java environment”, 1st International Conference on Objects and Databases (ICOODB’08), Berlin, Germany, 199-218, 13-14 March, 2008.
  • D. Zmaranda, L.-L. Pop-Fele, C. Győrödi, R. Győrödi, G. Pecherle, “Performance comparison of crud methods using net object relational mappers: A case study”, International Journal of Advanced Computer Science and Applications, 11(1), 55–65, 2020.
  • T. Balcı, Entity framework’ün farklı veri tabanlarındaki performans analizi, Yüksek Lisans Tezi, Kırıkkale Üniversitesi, Fen Bilimleri Enstitüsü, 2018.
  • B. Irakli, A. Bardavelidze, K. Bardavelidze, “Study And Analysis Of The .Net Platform-Based Technologies For Working with the Databases”, 33rd International Conference on Information Technologies, Bulgaria, 1-8, 19-20 September, 2019.
  • S. Cvetkovic, D. S. Janković, “A comparative study of the features and performance of orm tools in a. net environment.”, 3rd International Conference on Object and Databases (ICOODB’10), Frankfurt am Main, Germany, 147–158, 28-30 September, 2010.
  • J. Martin, Managing the Database Environment, Prentice Hall, New Jersey, 1983.
  • A. Joshi, S. Kukreti, “Object Relational Mapping in Comparison to Traditional Data Access Techniques”, International Journal of Scientific & Engineering Research, 5(6), 540–543, 2014.
  • V.Sivakumar, T.Balachander, Logu, R. Jannali, “Object Relational Mapping Framework Performance Impact”, Turkish Journal of Computer and Mathematics Education (TURCOMAT), 12(7), 2516-2519 2021.
  • H. Yousaf, Performance evaluation of java object-relational mapping tools, Yüksek Lisans Tezi, The University of Georgia Graduate Faculty, 2012.
  • D. Colley, C. Stanier, and M. Asaduzzaman, “The Impact of Object-Relational Mapping Frameworks on Relational Query Performance”, International Conference on Computing, Electronics & Communications Engineering (iCCECE), Southend, UK, 47-52, August 2018.
  • Internet: Microsoft technical documentation, Compare EF Core & EF6, https://docs.microsoft.com/tr-tr/ef/efcore-and-ef6/, 25.01. 2021.
  • Internet: A. Shapovalov, Micro ORM vs ORM, https://www. yaplex.com/blog/micro-orm-vs-orm/, 24.06.2022.
  • Internet: Dapper - a simple object mapper for .Net, https://github .com/DapperLib/Dapper, 24.06.2022.
  • Internet: Eager Loading of Related Data, https://docs.microsoft .com/en-us/ef/core/querying/related-data/eager, 24.06.2022.
  • Internet: NHibernate Reference Documentation, Chapter 21 Improving performance, https://nhibernate.info/doc/nhibernate-reference/performance.html#performance-fetching, 24.06.2022.
  • Internet: D. Paquette, Loading Related Entities: Many-to-One, https://www.davepaquette.com/archive/2018/02/06/loading-relate d-entities-many-to-one.aspxreference/performance.html#perfor mance-fetching, 24.06.2022.
  • Internet: A. Chan, High Performance Reflection ORM Layer, https://www.codeproject.com/Articles/22188/High-Performance-Reflection-ORM-Layer, 24.06.2022.
  • Internet: PostgreSQL 14.1 Documentation, What is PostgreSQL? https://www.postgresql.org/docs/current/intro-whatis.html, 25.01 .2021.
  • Internet: The World’s Most Advanced Open-Source Relational Database, https://www.postgresql.org/, 25.01.2021.
  • Internet: BenchmarkDotNet Powerful .NET library for benchmarking, https://benchmarkdotnet.org/index.html, 25.01.20 21.
  • Internet: .NET documentation, Diagnostics client library, https://docs.microsoft.com/en-us/dotnet/core/diagnostics/diagnos tics-client-library, 25.01.2021.