Jump to content

Tom F

  • Content Count

  • Joined

  • Last visited

  • Days Won


Tom F last won the day on June 16 2020

Tom F had the most liked content!

Community Reputation

29 Excellent

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. You're welcome. It took a lot of time to write. Good luck on your project. I'm headed back to coding. See the earlier post by @Stefan Glienke about your #3 being less likely to fail in the future if you change the enum definition.
  2. Mike, You asked me what I meant by digging "too deeply." Suppose you want to drive from New York City to San Francisco. It's about a 43-hour drive. Suppose your friend says, "Oh, I can make your trip shorter. When you get to Chicago, there's a very long stoplight you'll probably have to sit at for two minutes waiting for it to turn green. But, to avoid the slowdown, I know a great detour. It'll save you about a minute. Turn left when you get to Main Street, and then turn right at the next street, go two blocks, and then turn right again and then turn at the next left. This will take you around the block, avoiding the stoplight delay, and then rejoin your original route to continue on your way to San Francisco." Would you take the detour? The detour is faster than staying on the route with the long stoplight. But is it enough faster for you to worry about? Is it enough faster to bother taking? Is it enough faster to risk getting lost on the streets of Chicago? Is it enough faster to spend hours discussing on forums? How much faster should the detour be before you're willing to take it? How much risk can the detour add before you think to yourself, "I'm not going to take that detour." ??? In your code, you have no idea how long the trip is. You have no idea where the bottleneck slowdowns are. So, you have no idea if the proposed speedup will be significant. And people here in the forum are telling you that your detour (new code) may be riskier (i.e. more difficult to maintain.) Suppose your enum code is currently consuming a total of .0050 seconds every time a user clicks a certain button. Suppose you spend hours writing several versions of alternate code. Suppose your new code speeds up enum strings so that they're now TWICE AS FAST, so that processing enums only takes .0025 seconds. Was it worth your time to work on this? What many of us have been saying to you here and elsewhere is that the revisions (detours) that you're suggesting to speed up your code are insignificant and may bring risk. You need to learn how to put your efforts where they will have the biggest impact on improving your code. The first rule is WRITE THE CLEANEST, MOST MAINTAINABLE CODE YOU CAN. Then MEASURE your application with a performance monitor/profiler to identify places where it's slow. A profiler will help you do this by showing you exactly where your code is spending its time. It's likely that the amount of time your current code is spending on enum strings is infinitesimal compared to everything else your code is doing. So even if you speed up the enum code, the speedup is likely to have no impact on your users.
  3. If you're refactoring for maintainability, then I suggest you don't waste your time digging too deeply into speed benchmarks and certainly not into the assembly language.
  4. If you haven't benchmarked your application to see how much time this code consumes in the context of your application, you have no way of knowing what "significantly slower" means. I'd bet that you could slow down this function by a factor of 1000 and it would NOT noticeably impact your users' experience or computer resources. You're wasting your time. Why have you chosen to waste your time working on something that doesn't matter? As Glienke says, "Version3 is the best because it's maintainable and gives compile error if anyone decides to add a new value..."
  5. Hi, Mike, No, this wasn't posted in the wrong thread. You said you were refactoring. There are two reasons to refactor code that I'm aware of: 1. Make it easier to maintain. 2. Significantly improve the speed of the software. To answer your question about which approach is better, we need to know of the above two are you doing? Since you've provided speed benchmarks, I assume that it's #2 -- you're trying to significantly speed up your software. I suspect that you are prematurely optimizing your code for speed before you know where the bottlenecks are. Have you used a profiler to determine where to best focus on speeding up your application? Even if you made this code infinitely fast, would you or your users be able to notice the difference? If your answer is "yes" – then we'd love to hear about this novel application. If your answer is "no" – then you're wasting your time.
  6. How did you decide that this was code that you wanted to optimize? Have you profiled your application to see if this conversion is a significant bottleneck? These aren't rhetorical questions. I am genuinely interested in your answers. I hope you'll answer them here in a posting.
  7. Tom F

    AppAnalytics-type tool

    I'm looking to capture usage data. AppAnalytics was formerly available, including access to a server and reports. Emb still makes the code available it seems, including server code. But apparently there is not subscription access to a server for actually collecting data, unless we provide the server. I suspect that's way over my technical skills. So, has anyone have a suggestion on similar usage metering similar tool with a Delph app (Sydney)? TIA
  8. Tom F

    10.4.2 IDE crashes on start

    Your workaround above did not work for me. The only work-around I've found is to restart the IDE, select "None" for Code insight manager , then open the .pas file that was causing the crash. If I want, I can then re-enable LSP and it works fine in all files, including the one that was causing difficulties. The above doesn't always work for me but usually playing around with the Code Insight manager setting for a few times after a few crashes finally lets me load the file.
  9. Tom F

    10.4.2 IDE crashes on start

    Pat, loading an extra IDE doesn't solve this problem, which isn't a "disappearing act." The application bde.exe actually terminates and Windows generates a crash report. Dave, I've got 8 of 16 gigs of memory free, so a shortage of memory is not the problem. Thanks for the good suggestion though. I hadn't thought of that... I've discovered through a lot of trial and error that when I encounter a unit that when opening a file crashes the IDE, if I restart the IDE and toggle CodeInsight between LSP, Classic, and None, (sometimes a few times) I can usually load the problem .pas file. I haven't found any predictable sequence of toggling. Sometimes (but not always) I can load the .pas file into the IDE without a crash, regardless of whether CodeInsight is configured to LSP, classic, or None... 😞 This toggling procedure is not a fix, of course. It may simply be that there's some uninitialized memory that the above workaround leaves in a better state. The toggling procedure isn't even a reliable workaround since it apparently has to be done after the crash. All of this means I'm probably going to leave all my large forms and frames open in the IDE and not shut down the IDE for weeks at a time in an effort to avoid the problem. But at least I'm not stopped dead in my tracks. I also had a graceful crash in the IDE occur while I was testing this. I grabbed the call stack and other recommended files (like the DxDiag output) and appended them to the original RSP https://quality.embarcadero.com/browse/RSP-34109.
  10. A quick note to anyone looking at this thread. You probably would have figured this out on your own, but, looking at the Task Manager, it appears that when you re-select the LSP on the Options screen, you have to close and re-open any open project for the IDE to re-launch the LSP.
  11. Tom F

    10.4.2 IDE crashes on start

    Darn, I was afraid that's where you were referring to. Unfortunately, I don't have any of the git entries filled in. 😞 So that's not where my problem is headed. What bothers me is that the crash is so hard. There's no message or anything. The IDE just disappears. Most programs pop up a message box with exception errors. The Windows error log shows the crash, so perhaps somehow the IDE or my machine are now configured in some way to not show any crash messages. Or perhaps this particular crash is just too deep. Although the problem has been intermittent, at the current time I have a reliable way to make it crash. i.e. There is one particular.pas file that crashes every time I try to load it. I am making a VM backup of my development environment and noted in a comment in the RSP, hoping that EMB will ask for me to provide it.
  12. Tom F

    10.4.2 IDE crashes on start

    Uwe: Thanks for the suggestion. I still get intermittent lockups when opening .pas files, but so far see no pattern. How does one disable the internal Git client?
  13. Tom F

    10.4.2 IDE crashes on start

    Hi, Vandrovnik, Thanks for suggesting the command-line switches. I hid the splash screen and could see the new progress meter displaying the loading of my project's .pas source into the editor before it crashed. So I closed the IDE, and hid my source in a different folder, and was able to start the IDE. I then moved my source back to its original folder and all is fine for now, including being able to start the IDE. Somehow, the loading of one particular source file was causing a crash. However, the file loads fine now. I've turned off "Reopen last opened project when starting RAD Studio" I doubt the above steps fixed the problem. I expect the IDE will continue to intermittently crash, but at least I'll be able to restart it.
  14. Tom F

    10.4.2 IDE crashes on start

    That's a reasonable suggestion, Vandrovnik. Except I can't uninstall any packages, because I can't run the IDE. Does uninstalling RAD Studio uninstall everything or are their folders and registry entries I have to clean. This is an intermittent bug, so I can't just "try again" and hope it works. I need a development environment that is stable.
  15. I waited a long, long time to upgrade from 10.3 to 10.4.2, believing it would be stable by now. I was wrong. I spent most of yesterday doing a totally clean ISO install of 10.4 (including the updates from GetIt) and then installing all my third-party packages and tools. It worked, mostly. And I liked the new features. But, the IDE crashed a few times. I've used Delphi for more than 20 years and never had the IDE crash... until now. And now, when I start the IDE, it never gets past the splash screen before dying a silent death and disappearing. Report.wer file shows an exception. Even after rebooting my machine, the IDE won't start. Like many Delphi users, I'm thoroughly disgusted with Embarcadero's failures. I might be able to tolerate a few crashes a day. But, not being able to start the IDE means I'll have to roll back to 10.3. And I will cancel my subscription to updates. Any suggestions on how to narrow down the problem? I'm not a systems engineer. I'm not familiar with how the IDE loads, where I might disable certain add-ins. Are there any suggestions on how to get the IDE running again???