-
Content Count
1977 -
Joined
-
Last visited
-
Days Won
26
Everything posted by Attila Kovacs
-
Pointers are dangerous
Attila Kovacs replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
*Read: The code used to work by accident. -
Build time with 10.3 almost doubled
Attila Kovacs replied to santiago's topic in Delphi IDE and APIs
Turn off theming and dump moderntheme260.bpl and re-check. (Alternatively you could disable the compile dialog) -
I'm looking for these menus in the IDE
Attila Kovacs replied to Attila Kovacs's topic in Delphi IDE and APIs
@PeterPanettone Maybe your misunderstanding? This is the Navigation toolbar: Not ok? -
Hi, Can we have a sub for OTA/Expert development? As for pro's as for hobbyists, for asking for help, sharing ideas, etc.. Greets
-
I'm looking for these menus in the IDE
Attila Kovacs replied to Attila Kovacs's topic in Delphi IDE and APIs
There must be space on the TEditorNavigationToolbar for that. On the same analogy I put the standard IDE form editing toolbars to the top of the FormDesigner. Where it actually belongs to. -
Did you solve it John? Looks similar to this:
-
Unresponsive IDE and massive memory leaks with RIO
Attila Kovacs replied to Stéphane Wierzbicki's topic in Delphi IDE and APIs
Strange. Also, on a fresh windows, Rio installer creates a ...BDS\19.0 registry entry too. It's empty, but this means they have places where the path is still from tokyo. -
Unresponsive IDE and massive memory leaks with RIO
Attila Kovacs replied to Stéphane Wierzbicki's topic in Delphi IDE and APIs
did you install delphi for all users or for one user? what if you start it as administrator? There are a lot of access denied entrys. -
I'm not sure what are you asking and how should we help blindfolded, but I would do these in first place: move your declarations out to a separate unit if you can, if not, move it somewhere else inside the current unit and check if the same AV raises (eventually declare dummy vars between the arrays) turn on range and overflow checking (1..100 could be tricky) check your class destructors if you have, they are processed at finalization place a breakpoint at the "end." in your dpr and start stepping through and try to understand what happens
-
General DB access question -- paging query results
Attila Kovacs replied to David Schwartz's topic in Databases
@Dmitry Arefiev Since you are already here, do you have any Sql Server Schema/Data sync tool in your drawer? -
General DB access question -- paging query results
Attila Kovacs replied to David Schwartz's topic in Databases
ORDER BY x,y,z OFFSET 19900 ROWS FETCH NEXT 100 ROWS ONLY It's also new for me so I don't know the caveats, but it looks interesting/promising. Sql Server 2012+ -
Rio has a broken REST Library
Attila Kovacs replied to Jacek Laskowski's topic in RTL and Delphi Object Pascal
Ok, looks like the coder used this trick to trim the trailing zeroes but didn't count with empty/short headers. -
Rio has a broken REST Library
Attila Kovacs replied to Jacek Laskowski's topic in RTL and Delphi Object Pascal
I like winapi. There you can get real knowhow by bruteforcing it. -
Rio has a broken REST Library
Attila Kovacs replied to Jacek Laskowski's topic in RTL and Delphi Object Pascal
@Stefan Glienke I've seen too late, already updated, also not sure anymore, but what else could be -
Rio has a broken REST Library
Attila Kovacs replied to Jacek Laskowski's topic in RTL and Delphi Object Pascal
https://docs.microsoft.com/en-us/windows/desktop/api/winhttp/nf-winhttp-winhttpqueryheaders If the function fails and ERROR_INSUFFICIENT_BUFFER is returned, lpdwBufferLengthspecifies the number of bytes that the application must allocate to receive the string. Looks like the -1 is the problem. -
property Items: TArray<TMyType> - enumerate props of TMyType?
Attila Kovacs replied to Lars Fosdal's topic in RTL and Delphi Object Pascal
@Lars Fosdal TMyType has no inherited properties so if the list is empty this is the max you can get. (According to your example) If you have for example an object of TMyType3 type in the list, this is something else, then there is GetProperties and GetDeclaredProperties, or if Item is TBaseClass then begin tc := Item.ClassType; while tc <> TBaseClass do begin // GetDeclaredProperties comes here tc := tc.ClassParent; end; end; in this case you get the declared properties up to the TBaseClass which is not necessarily TObject so you are filtering with this your "own" properties. I think you can implement the version which fits your needs and which is perhaps also a bit different as the example above. -
property Items: TArray<TMyType> - enumerate props of TMyType?
Attila Kovacs replied to Lars Fosdal's topic in RTL and Delphi Object Pascal
var ctx: TRttiContext; rt: TRttiType; tf: TRttiField; tft: TRttiDynamicArrayType; tc: TClass; prop: TRttiProperty; code MyVar := TMyOuterType.Create; ctx := TRttiContext.Create; for tf in ctx.GetType(MyVar.ClassInfo).GetDeclaredFields do // took FItems as a class Field as it was easier to work with if tf.Name = 'FItems' then // change it to GetDeclaredProperties for Properties begin tft := tf.FieldType as TRttiDynamicArrayType; rt := tft.ElementType; for prop in rt.GetDeclaredProperties do writeln(prop.Name); Break; end; -
General DB access question -- paging query results
Attila Kovacs replied to David Schwartz's topic in Databases
I've linked you a page where is written how for example firedac solves (helps) the problem. Rowset Fetching allows you to specify the number of records that will be fetched from the server in one network round trip. The rowset size is controlled by the FetchOptions.RowsetSize property. Bla bla... But it's not just that. The DB control you are using for displaying the data (and your code ofc.), should not force the dataset to fetch everything at the beginning, by doing things, like displaying sums on the bottom, auto sizing column based on values, sorting on client side, whatever.. Also consider splitting up the lists to live data, near past and history. -
General DB access question -- paging query results
Attila Kovacs replied to David Schwartz's topic in Databases
I have to guess, is this a kind of -we show a big list in a grid- kind of architecture defect? BDE delivered the first X row immediately meanwhile the rest was dled in the background, so it wasn't a big deal on a local network. I'm sure that those who updated to zeos lib back in the time faced the very same problem as it fetched everything and it took too much time. With most recent libs it's better, but it's even better not to load too much. I've for example a form where I can say, load me just X month of data. And of course just the fields the grid needs. Then there are the other type of apps, where you get an empty form (db controls without data), a search field, and a db-navigator. Yeah, it's ugly, not as transparent, but for sure the less resource taking variant. However, 10-15 minutes are just too much. If it's a local network there is something else too. It's 10GB on 100mbit and ~100GB on 1000mbit network. -
General DB access question -- paging query results
Attila Kovacs replied to David Schwartz's topic in Databases
You forgot the "I'm doing something wrong" part. Last time I've seen a similar case was a incidental table blocking. If one specific form was opened (anywhere in the network), some tables were blocked even for reading. I also don't know what is the architectural defect, if only few customers are complaining. I hope it's reproducible and you can narrow it down. -
General DB access question -- paging query results
Attila Kovacs replied to David Schwartz's topic in Databases
I've learned in the very beginning, that if I can't find answers to my problem, neither similar questions, then most probably I'm doing something wrong and the problem is non-existent. -
Impact of debug dcus on performance
Attila Kovacs replied to pyscripter's topic in Delphi IDE and APIs
I don't have the impression that the debug dcu code has been compiled with optimization. I'm also not sure if it's should have been. For exception reporting I'm using eurekalog, the call stack is okay, maybe not as verbose as with debug dcu's. But in principle I never release with debug dcu's. -
Impact of debug dcus on performance
Attila Kovacs replied to pyscripter's topic in Delphi IDE and APIs
@pyscripter Uhh, sorry, it wasn't. Now it's as slow as Berlin. Like the enhancements in rio were missing from the debug dcu-s. It's about 20secs. -
Impact of debug dcus on performance
Attila Kovacs replied to pyscripter's topic in Delphi IDE and APIs
@pyscripter Hi, I can't see any difference between release/debug under Rio/x86. Both are done in 12.x seconds. -
General DB access question -- paging query results
Attila Kovacs replied to David Schwartz's topic in Databases
You can't. A 14 years old research has shown that deleting / editing posts are better not allowed.