tag:blogger.com,1999:blog-1532151022505671498.post3834308718878215220..comments2023-11-24T22:28:36.140+01:00Comments on Delphi sorcery: Spring4D 2.0 sneak peek - the evolution of performanceStefan Glienkehttp://www.blogger.com/profile/05509404049325709406noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-1532151022505671498.post-19274358929825480432023-11-22T18:11:44.760+01:002023-11-22T18:11:44.760+01:00Good information.
-------------------------...Good information.<br /><br /><br /><br /><br /><br /><br /><br />-----------------------------------<br />I work in <a href="https://factored.ai/accelerator-programs/" rel="nofollow">machine learning engineer </a>Rafamad435https://www.blogger.com/profile/18049103101821589682noreply@blogger.comtag:blogger.com,1999:blog-1532151022505671498.post-48133465863983026372021-06-18T16:52:20.475+02:002021-06-18T16:52:20.475+02:00Thanks Stefan.
I understand your technique with i...Thanks Stefan. <br />I understand your technique with interfaces. Unfortunately, our generic code is in this case based on record : Type Ensemble = RECORD<br />So duplicated in dcu ...<br />But it's a good idea.LaurentEhttps://www.blogger.com/profile/03049829750338840520noreply@blogger.comtag:blogger.com,1999:blog-1532151022505671498.post-23537208530639316052021-06-18T14:44:25.318+02:002021-06-18T14:44:25.318+02:00Generally when using generics and want to reduce b...Generally when using generics and want to reduce bloat you need to keep the actual generic code small. Depending on the allowed types for your generic type arguments this can be easier or more complicated. Especially when constraining on class then it is pretty easy as you can directly use code that works with TObject and TClass internally.<br />When you have code like in collections where T can be anything its more complex. When your class hierarchy gets large often generics creep deeper into it than often necessary.Stefan Glienkehttps://www.blogger.com/profile/05509404049325709406noreply@blogger.comtag:blogger.com,1999:blog-1532151022505671498.post-72359759744609933872021-06-18T14:41:03.979+02:002021-06-18T14:41:03.979+02:00Study the code in Spring.Collections.pas - especia...Study the code in Spring.Collections.pas - especially the factory methods in TCollections.<br />This technique is possible because of interfaces. To the consumer you have strongly typed IList<TCat> and IList<TDog> but behind both is basically just a TList<TObject>.Stefan Glienkehttps://www.blogger.com/profile/05509404049325709406noreply@blogger.comtag:blogger.com,1999:blog-1532151022505671498.post-21000679257241964642021-06-18T13:57:40.938+02:002021-06-18T13:57:40.938+02:00Hi,
Thanks for your work.
We are very intereste...Hi, <br /><br />Thanks for your work.<br /><br />We are very interested in point 2. We use a lot of generics and compilation/linking durations have increased ... Can you explain this statement : "In 2.0 all RTTI for the implementing classes which you will never touch anyway is turned off and with some trickery, many generic specializations are folded and forced into the Spring." What are the "trickery" ?<br />We really appreciate some help.<br />Best regard<br />LaurentLaurentEhttps://www.blogger.com/profile/03049829750338840520noreply@blogger.comtag:blogger.com,1999:blog-1532151022505671498.post-29070008283450394972021-06-16T20:07:14.219+02:002021-06-16T20:07:14.219+02:00I was just curious because maybe the reason was so...I was just curious because maybe the reason was something that I am not aware of.<br /><br />Also better to let the author/maintainer know there is some issue than silently not using it. Maybe they were not aware of the issue and you might miss the chance to cause an improvement everyone will benefit from.Stefan Glienkehttps://www.blogger.com/profile/05509404049325709406noreply@blogger.comtag:blogger.com,1999:blog-1532151022505671498.post-19603407688784083192021-06-16T19:46:55.268+02:002021-06-16T19:46:55.268+02:00Hi Stefan, sorry for not being able to provide the...Hi Stefan, sorry for not being able to provide the details, it was years ago and I cannot recall the details... Should I delete the comment? Spring4D is awesome and my previous comment without details doesn't contribute obvious value...Edwin Yhttps://www.blogger.com/profile/04453313411079119897noreply@blogger.comtag:blogger.com,1999:blog-1532151022505671498.post-11283777419600722852021-06-15T15:21:04.148+02:002021-06-15T15:21:04.148+02:00Hi Stefan. Thank you very much for Spring4D. It...Hi Stefan. Thank you very much for Spring4D. It's an amazing and valuable library. FLDelphihttps://www.blogger.com/profile/01207670669372054618noreply@blogger.comtag:blogger.com,1999:blog-1532151022505671498.post-63473939240625828322021-06-15T13:42:13.552+02:002021-06-15T13:42:13.552+02:00Since you indicate that Spring was responsible for...Since you indicate that Spring was responsible for that - can you specify what exactly caused the delay? I guess it was executing code which did not run as fast as expected.Stefan Glienkehttps://www.blogger.com/profile/05509404049325709406noreply@blogger.comtag:blogger.com,1999:blog-1532151022505671498.post-82498786515341578372021-06-15T11:12:39.192+02:002021-06-15T11:12:39.192+02:00Well done Stefen! And, just as a clue that indicat...Well done Stefen! And, just as a clue that indicates that you are heading to the right direction (optimizing the collections), re. "almost nobody complained about that so far. ", I did remove Spring4D from a project due to the human-noticeable program startup delay ;)Edwin Yhttps://www.blogger.com/profile/04453313411079119897noreply@blogger.com