-
Content Count
2994 -
Joined
-
Last visited
-
Days Won
107
Everything posted by dummzeuch
-
No idea. But I guess they would have overriden if that was necessary.
-
If it is overridden, the correct method should automatically be called. If it is reintroduced, that's bad practice, in particular for such an important base method, and I doubt that any Borland/Codegear developer did this in the code of the IDE.
-
TControl.Invalidate is virtual, so this should call the correct method of any derived class. I'll post the RTTI code tomorrow when I'm back at my computer. It's actually quite simple and will work with any relevant version of Delphi, as long as the property is declared published.
-
Embarcadero 11.1 access violation coreide280.bpl
dummzeuch replied to capi48's topic in Delphi IDE and APIs
This is not an Access Violation. -
That's what I meant by: Oddly enough changing the font size takes effect immediately but still ignores the change to DefaultNodeHeight until I click on a tree node. And even then it only redraws that one tree node and the one that was selected previously.
-
I am seeing two problems: Simply setting the DefaultNodeHeight does not make any difference, regardless whether I use your hack or simply set it via RTTI. When also assigning an OnMeasureItem event (via RTTI) that returns the correct node height, it works, but only when I click on an entry which causes that entry to be redrawn or when I load a new project. I tried to call TWinControl.Invalidate and sent a WM_Paint message to it but it didn't make any difference. I have also temporarily disabled all experts which did not make any difference. There is one difference between what your expert did and what I am currently trying: I want to have menu entries to turn this functionality on and off. I also want to make it use the "correct" size depending on the current DPI and the design DPI.
-
As you might have guessed I am playing around with this code. It works fine for the object inspector (I have added code to also increase the font size). But it does nothing for the TVirtualTreeViews e.g. the Project Manager. As far as I understand it, it should set the DefaultNodeHeight by directly calling some method whose address is hard coded as you wrote above. My installation should contain all patches, but it doesn't work. How did you determine that address? Edit: I also tried to set the DefaultNodeHeight property via RTTI. It also didn't make any difference. But in the IDE Explorer the correct value was shown.
-
-
As for having the option to start with or without high DPI awareness: I just copied the bds.* files in my Delphi 2007 bin directory to hbds.* and created an entry for that under HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers for it. Now I can start the IDE as bds.exe with System High DPI settings and hbds.exe with Application High DPI settings. I also tried to simply edit the application manifest of hbds.exe but that didn't work, unfortunately. Not sure whether this will work with newer IDEs though, because Embarcadero "improved" their detection of tampering with the licensing.
-
Just in case anybody else is interested: The setting @Attila Kovacs was talking about is stored in the registry: HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers There are entries with the full path of the executable. In my case for Delphi 2007: C:\Delphi\Delphi2007\bin\bds.exe And a text value. which seems to contain entries separated by a space. Enabling the "High DPI scaling override" option adds a "HIGHDPIAWARE" value to that entry, Disbling it removes that entry I'm not sure where the selection from the combo box is stored though. Possibly under HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Store There are again entries with the full path of the executable, but this time the data is binary so it's not easy to decode. All entries start with the letters SACP, whatever that means. EDIT: No, changing that option did not make any difference there. The selection in the combo box decides what is stored there too. Enabling the "High DPI scaling override" option and selecting "Application" adds a "HIGHDPIAWARE" value selecting "System" adds a "DPIUNAWARE" value selecting "System (enhanced)" adds "GDIDPISCALING DPIUNAWARE" Disabling it removes these values. As the entries refer to the absolute path of the executable rather than the shortcut, there seems to be no way to create separate entries for different shortcuts to an executable which is a bit inconvenient. Maybe we should move this part of the conversation to a new thread? "Making older Delphi IDEs partially High DPI aware" or something?
-
I don't remember that. I probably was busy at the time and then forgot about it. Did you file (a) bug report(s)?
-
No, that doesn't make any sense. Even assuming you meant the the other way round: ExtractFileDrive(ExtractFileName(ExeName)) it wouldn't return what he wants. I'd go for ExtractFileName(ExtractFileDir(ExeName))
-
Odd timing when using multiple threads
dummzeuch replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
Oh, you were referring to how the program decides how many threads to use? I have implemented that already to use as many threads as there are logical processors, determined using GetSystemInfo. I was more worried whether their current computers are good enough to run the program or if they need an upgrade. If their hardware changes in the future, it will be likely become faster anyway. -
Odd timing when using multiple threads
dummzeuch replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
I've taken the low tech approach: I asked the colleagues, what type of processor their computer(s) have. -
Odd timing when using multiple threads
dummzeuch replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
Interesting approach. I already do that. Hm, yes. I'll have to think about this. So far I am quite satisfied with reducing the analyzing time for the pictures by a factor of 8 (on my computer). Now I need to find out how many logical processors are available on the computers on which this program will actually be used. Since these are probably >2 years old, they might need updating anyway. The program itself now has 60% processor usage, up from 17% (when it was single threaded), so there are probably some other parts which could be improved which might be easier to achieve. -
Odd timing when using multiple threads
dummzeuch replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
Of course: There are only 8 virtual processors on my computer, so the maximum of threads that can run in parallel is 8. I should have thought of that. -
Odd timing when using multiple threads
dummzeuch replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
My knowledge of processor architecture is insufficient to answer this question. The work packages are advanced records in a dynamic array, so their data is located within the same memory area on the heap. Which turned out to be the problem. The work memory area of each work package was declared like this: TWorkPackage = record FCounter: PInt32; FIsDone: LongBool; FScanLine0: PByte; FBytesPerLine: Integer; FWidth: Integer; FHeight: Integer; FTop: Integer; FBottom: Integer; FPixelValues: TMedianValuesArr; FMedianPixelArr: TMedianPixelArr; FArr: TBrightnessMatrix; FSum: int64; FStopwatch: TStopwatch; end; And these were stored in a dynamic array, so they were all located within the same memory area. FMedianPixelArr is constantly being written to in all threads. If I understand the cache line stuff correctly, the fact that these records were stored all within a memory block smaller than the CPU cache line (apparently 256 Bytes at most with current CPUs) this caused the cache becoming invalid for all threads every time one of the threads wrote to this area. For testing this, I have now simply increased the size of the record by 256 bytes by adding an array [0..255] of byte to it so each of them is larger than the maximum possible cache line. Here is the timing after this change: 1 calls using 1 threads: 1143 ms (TotalTime [ms]: 1125 SingleTimes [ms]: 1125) 1 calls using 2 threads: 607 ms (TotalTime [ms]: 1124 SingleTimes [ms]: 565 559) 1 calls using 3 threads: 451 ms (TotalTime [ms]: 1186 SingleTimes [ms]: 395 393 398) 1 calls using 4 threads: 368 ms (TotalTime [ms]: 1222 SingleTimes [ms]: 308 298 312 304) 1 calls using 5 threads: 367 ms (TotalTime [ms]: 1357 SingleTimes [ms]: 244 306 303 242 262) 1 calls using 6 threads: 344 ms (TotalTime [ms]: 1533 SingleTimes [ms]: 228 259 274 271 245 256) 1 calls using 7 threads: 296 ms (TotalTime [ms]: 1636 SingleTimes [ms]: 222 246 227 219 236 250 236) 1 calls using 8 threads: 304 ms (TotalTime [ms]: 1806 SingleTimes [ms]: 226 222 224 225 227 225 224 233) 1 calls using 9 threads: 322 ms (TotalTime [ms]: 1909 SingleTimes [ms]: 230 226 198 238 220 197 199 195 206) 1 calls using 10 threads: 326 ms (TotalTime [ms]: 2009 SingleTimes [ms]: 174 216 172 208 176 236 232 178 213 204) 1 calls using 11 threads: 295 ms (TotalTime [ms]: 2140 SingleTimes [ms]: 232 222 221 165 221 171 201 162 158 181 206) 1 calls using 12 threads: 273 ms (TotalTime [ms]: 2494 SingleTimes [ms]: 212 208 224 210 227 210 212 212 198 202 198 Which is exactly what I would have expected: The total processing time is reduced roughly inverse proportionally with the number of threads until the overhead of splitting the work reduces the potential gain of using more threads. Hm, looking at the single times values: Given that with each additional thread the number of lines each thread needs to be processing decreases, I wonder why these times don't get any lower than around 200 ms. Anyway, thanks @Anders Melander you seem to have nailed the problem. -
Odd timing when using multiple threads
dummzeuch replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
My knowledge of processor architecture is insufficient to answer this question. The work packages are advanced records in a dynamic array, so their data is located within the same memory area on the heap. -
Odd timing when using multiple threads
dummzeuch replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
After replacing the dynamic array with a static array (see above), the timing now looks like this: 10 calls using 1 threads: 1158 ms (TotalTime [ms]: 1140 SingleTimes [ms]: 1140) 10 calls using 2 threads: 1412 ms (TotalTime [ms]: 2872 SingleTimes [ms]: 1437 1435) 10 calls using 3 threads: 1302 ms (TotalTime [ms]: 2501 SingleTimes [ms]: 1055 1060 386) 10 calls using 4 threads: 752 ms (TotalTime [ms]: 2657 SingleTimes [ms]: 503 650 767 737) 10 calls using 5 threads: 670 ms (TotalTime [ms]: 2832 SingleTimes [ms]: 364 627 668 582 591) 10 calls using 6 threads: 643 ms (TotalTime [ms]: 3195 SingleTimes [ms]: 316 528 553 501 635 662) 10 calls using 7 threads: 503 ms (TotalTime [ms]: 2973 SingleTimes [ms]: 459 466 360 473 493 404 318) 10 calls using 8 threads: 520 ms (TotalTime [ms]: 3460 SingleTimes [ms]: 344 364 356 470 498 450 486 492) 10 calls using 9 threads: 526 ms (TotalTime [ms]: 3854 SingleTimes [ms]: 316 322 427 428 440 498 517 456 450) 10 calls using 10 threads: 417 ms (TotalTime [ms]: 3238 SingleTimes [ms]: 228 325 338 392 274 386 361 337 324 273) (TotalTime is the sum of the processing time for all threads. SingleTimes are the processing times for each thread.) -
Odd timing when using multiple threads
dummzeuch replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
Yes, it does indeed. But since ... Assigned(FData) and Assigned(FWorkCall) ... will be False if no work package has been assigned, it will simply do nothing and then return into the wait state. Good point, but since the thread pool is specific to the class doing the processing that can't be the case. All threads are idle when bitmap is passed into the method and will be idle again once the processing has finished. I found something though: I was using a single dynamic array to hold some intermediate results which was initialized within the work packages. Replacing it with a static array of the required length removed the timing oddity. Now two threads consistently take significantly longer than one thread and the processing time goes down from there on. This is kind of consistent but not really useful. 😞 -
Is anybody using or has evaluated the translation tool LangMan for Delphi from Regulace? I have had a look at the extensive documentation and also watched the video and this left quite a good expression. Unfortunately there seems to be no evaluation version available and from the video it looks as if it might be quite a bit of "click-work" ("man klickt sich einen Wolf" roughly translated as "You click yourself ragged") required. But on the other hand it might be easy to use for non-programmers to provide translations for at least the UI part of a program without needing much support from the software development side. (Please don't suggest dxGetText. I am quite familiar with it for obvious reasons.)
-
GExperts Grep is always case sensitive when regular expressions are enabled
dummzeuch replied to David Hoyle's topic in GExperts
In case anybody wants to test it: This problem should be fixed in revision #3843 -
GExperts Grep is always case sensitive when regular expressions are enabled
dummzeuch replied to David Hoyle's topic in GExperts
Wow, that's great support from Alex-T over on GitHub. He is currently helping me to fix those pesky compile problems, so I will be able to update SynRegExp with the original RegExpr unit. -
GExperts Grep is always case sensitive when regular expressions are enabled
dummzeuch replied to David Hoyle's topic in GExperts
The current RegExpr unit on GitHub fixes that problem, but unfortunately it no longer compiles with pre UNICODE Delphis because somebody added a {$define Unicode} to it two years ago. -
I just tried to reproduce your problems with Delphi 2007 (I haven't got Delphi XE4 on this computer) but hiding the history list worked fine even when restarting the IDE multiple times, and I also didn't get the access violation when searching with the options you listed. So, without getting any more specific information on when this happens, there is nothing I can do. For the AV you could try to compile a new DLL and debug the issue yourself.