Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 08/18/19 in Posts

  1. Maybe this will help someone deciding on trying to use Delphi in VM: I used Delphi 10.2.3 in VMware for a month and I just reinstalled it back on my local machine, it just didn't really work for me in VM. So, specification: Desktop: Intel I7 4790K (4c/8t), 32 GB Ram and all SSDs; Windows 10. VMWare Workstation Pro 15.1 installed on local PC - I researched quite a lot on how to improve experience with VM Settings: Memory: 12GB Processors: 4 (processors: 2, cores per processor: 2) VM file is on separate SSD. Fresh Windows 10 installed in VM (+all updates + all latest drivers) To make it run a fast as possible (or to limit resources used) I disabled all non-essential services, cleaned up startup programs, no antivirus or antimalware installed. Very few other tools, just 7z, WinRar... Delphi 10.2.3 + IDEFixPack + MMX + GExperts + CNPack Disabled Start page + disabled Live binding. One of the reasons why I tried Delphi in VM is to have simple backup and grab-and-go Delphi environment. So, at first it seemed to work well, full build time was a bit slower, but not too annoying - 50% longer than compile time on local. A bit slower IDE, slower switching between Form and code. For the testing of concept it was acceptable and luckily at that time I didn't have any real development time scheduled, just some minor bug fixes. But as soon as I started really working with it, all these little things became very annoying, in a matter of few hours: - delays in mouse right-click in code to use Toggle Breakpoints or Refactor (rename variable) - delay on selecting Form controls and Object inspector to populate properties and Structure view - opening menus - even ctrl+home/end on large unit (40K loc ) was delayed - and other little delays here and there The delay I'm talking about is very minor, probably less or close to 1s, but when you use IDE a lot these delays become very apparent and annoying. For me this was too much after a few hours of real work. To summarize, I think I optimized VM as much as I could to run as fast as possible; the computer is still powerful enough even though is not brand new high-end computer; I don't have huge projects, but they do have some 100Ks loc each. If I would install all the rest of the tools I use in my daily development environment and run them as I do on local computer (memory regularly gets used 20GB+) it would slow down the whole VM experience even more. I doubt that VirtualBox or any server virtualization (Hyper-V?) would improve the experience. Maybe it's my patience (or the lack of it) that got tested really fast, but VM just isn't working for me. If anybody has different experience, please let me know if you have any advice on how to make the whole experience better - smoother IDE, like on local installation where runs really fast (very acceptable).
  2. David Heffernan

    Passing back a string from an external program

    It really is
  3. Thanks for the proposal. Yes, revert may reset the libraries, but can I really always trust what it does ? So to use the "clean project" approach is probably only a few clicks more, and from there I can be very sure that it will work the way intended. This is only a small part of the whole project configuration, what about the rest ? I don't really like all these "magic" functions in the IDE project management when it turns out that they might have flaws in the end. For example the inheritance of project options (All --> Debug --> Release) never worked out for me to be stable, so I better check and fumble befor every major option setup, to be sure that not suddenly something bad happend there. Maybe there are better solutions to check and compare, e.g. to use export/import options sets, project configurations or the .dproj files directly, and make all global adjustment in the option sets XML or in the .dproj files directly before re-loading and building. I could think of external tools, like the Settings Migration Tool, Project Magician, or others for help keeping the project clean, is there probably any tool or a combination of several tools, that can help in a nice way ? A kind of .dproj DIFF viewer and editor which is able to sort out related settings might be great utility as well.
  4. Hi, from July 23 - to August 1. br,
  5. A.M. Hoornweg

    64-bit type libraries still not supported by the IDE ?

    Hi David, I'm aware of these workarounds, thanks. But I'm also aware that a 32 bit process *can* actually see the 64 bit registry, see https://docs.microsoft.com/en-us/windows/win32/winprog64/accessing-an-alternate-registry-view . And if that weren't the case, the problem could also be solved by putting the tlb importer GUI in a separate process, to be compiled in two versions. It would just be really nice if this feature worked like it's supposed to.
  6. David Heffernan

    Google Play Store - request extension for Delphi apps

    Choosing a better tool for mobile development is surely an option
  7. Solved, {$R *.res} was somehow missing from the dpr file :P
  8. Darian Miller

    Using Delphi in Virtual machine for a month

    I've been using Delphi in a VM for a number of years utilizing VMWare Workstation and I believe it runs really well. It sounds like a VMWare settings / allocation issue. Couple pointers: - Do not utilize 'thin-provisioned' disks. Pre-allocate the assigned space otherwise you'll get sporadic speed issues as the disk increases in size. - Exclude the directory on the host machine where your VM files are stored from realtime AV scanning. If you cannot exclude a specific folder (like McAfee), get a different AV. - Don't try to assign too much RAM to the VM. Test scaling it back from 12GB to 10 and then 8. I have 64GB RAM in the host and only allocate 8GB to my Delphi VM. - Use SCSI virtual disks - Display: Accelerate 3D Graphics + assign a decent amount of graphics memory (1GB) - The more snapshots of a VM, the worse the performance seems. Make physical backups instead and get rid of your snapshots. - I periodically defragment the virtual disks within VMWare (https://docs.vmware.com/en/VMware-Workstation-Pro/15.0/com.vmware.ws.using.doc/GUID-BD914064-D20D-4032-9373-88F4DA7AE7C6.html) Some items I don't use, not sure on the performance benefit - Don't use the built-in Shared Folders - Don't use the built-in auto-protect - Don't sync time with host If you can swing it - use NVMe disk instead of SSD.
  9. One option to consider: Instead of using the monitor/mouse/keyboard emulation of the VM, try connecting to the VM through Remote Desktop. In my experience that makes a lot of a difference.
  10. John Kouraklis

    Using Delphi in Virtual machine for a month

    I use Delphi in VMWare for nearly 5 years. In general, I am very happy with the speed but TBH I haven't used it in natural machine. I've got packages, tools, libraries VS, Android Studio all in one machine and I am able to work nicely. From my experience, what matters when you run a VM is the setup of the VM of course but also what is happening in the host computer. Memory: the more allocated to the VM the better but not more than that...there is a point where your host will start crawling and the VM will become sluggish if the host does not have enough memory SSD and avail space: SSD for obvious reasons and AVAIL SPACE...from what I have seen, you need lots of space with VMWare. I mean for a VM that has a 200GB hard drive, you may need 300GB in the host computer and maybe more if you keep auto protect and other snapshots. Even deleting snapshots you need 20-40GB free on your host drive Restating the host computer: I've noticed that many times, VMWare does not clean and release the previously used space to the host computer. You may, for example, have 20GB avail after deleting a snapshot and when you restart the host you get 45GB Antivirus, Windows Update, Microsoft Store and all the other services (eg. svhost) in the host computer. This environment needs to be very pure (and mine is not)...but there are limits even to the level of this kind of purity you can achieve Backup software on host: There was a time when my VMs were getting very very slow without any reason and after months I discovered that there was a backup services running in the background. It was copying the whole VM to the backup disks and this was making the VM unworkable. Later I found out that there is VMWare API for backup and some nice specialised software that allows the VM to work smoothly (eg. the free Vimalin) Netflix: if you have that bad habit to play a documentary in one screen while you are doing some light work in your VM in the second monitor, then you are hurting the performance of the VM. On my laptop, the Netflix app is a performance killer (regardless of the VM). Thankfully, I got rid of that bad habit I have, also, configured windows to use the NVIDIA graphics card with VMWare instead of the integrated graphics. Not really sure whether it makes a real difference though. And, I have completely disabled Windows Store in the VM. Actually, I have damaged the installation and I am sure it will bite me back at some point Don't forget, also, to run CCleaner or something similar quite often in both the host and the VMs
  11. We have been using Delphi in a VMWare Workstation for over a decade. We have a team of about 12 people. Some remote workers use Delphi in a Citrix instance run on our XenDesktop environment. A decade ago, there were lots of problems. Windows activation issues. Delphi activation issues. etc. But we stuck with it because it ensured all team members have an identical instance set up appropriately. Also, if one computer crapped out, we were up and running within 20 minutes. These days, its a no brainer. We dont even have Delphi installed directly on the host machines any longer, so I cannot compare to a host installation on the same machine, but running in the VM is more than acceptable. All benchmarks we have run (i.e. running same executable inside vm and on real machine) are within 95% speed of each other. For profiling, we dont even both copying to the host machine any longer, unless we are profiling heavy multi-threaded work. What does make a big difference is to put the VM on an SSD. Compile times are much faster. Our App is about 2 million LOC, but we ensure that our individual units are not too large. Usually a few K LOC, up to a max of 20K LOC or so. CTRL+END is pretty instant for me, even in the largest units. Maybe we would get 1/2 sec better on some mouse actions if we installed it on the desktop, who knows, but I personally do not notice any speed impediment due the to the VM. My typing speed is usually the bottleneck, not the IDE (and I type pretty fast).
  12. Alexander Sviridenkov

    formatting HTML code

    Currently library supports formatting only for XML or XHTML. HTML formatter is expected in next version.
  13. David Schwartz

    General mobile app <-> REST design question

    I get all this, but you stepped right over the part that I'm most curious about. The UI says, eg, "Marguarita pizza", "Regina pizza", "Meat Lovers pizza", or "Veggie pizza". These are examples of standard combinations, and there could be a dozen or more. Your "order" packet (TOrder) might have a place to specify a "standard combo" by name. But there's usually an option for "build your own combo", right? In that case, you need a list of ingredients to show the user from which they can make their choices. There could be 5, 10, 20, whatever. AND ... would it not not also be perfectly acceptable to specify all of the individual ingredients when the user selected a standard combo, rather than (or in addition to) the combo's name? Where does this list of ingredients come from? Also, the catalog of standard combos (and what's in them)? Do you build these lists or catalogs into the app? Or would you normally plan for them to be loaded (or updated) from the server when the user logs-in? Is TOrder an ingredient list, or a meta-list that can hold catalogs (lists) of ingredients? See my point? I don't care about JSON or REST -- or even pizza. How does one approach a design like this?
  14. Arnaud Bouchez

    General mobile app <-> REST design question

    Following DDD principles, I will define several REST services - MicroServices, to be more exact. The first service would be a public API. You won't put here ingredients, but only the pizza kinds (marguarita, regina, calzone...), with some potential additional change (add an egg for proteins, remove tomato if allergic...). This service is known as the application layer. It could be called directly from a web site, a mobile app, or a Linux GTK app (for geeks). It follows the typical high level use-cases of a customer wanting to eat a pizza. This application layer will then use an internal REST service, in which my pizza "domain" will be coded. That is, it will know the "pizzaiolo" knowledge. What are the ingredients, how much of each, cooking time, heaven scheduling... This is the DDD domain, since it is where the real value of the pizzeria is: the better the pizza, the more customers, the more income... But this application layer may also notify other REST services, like: - the billing microservice; - the ingredient stock microservice; - the user preferences microservice (to retrieve the customer preferred pizzas); - the delivery microservice when the pizza is ready; - the management microservice (for the big boss to get consolidated information about the restaurant)... Those microservices won't be part of the main "domain", and could even be third-party services (billing, delivery...). Think of the application layer as the "orchestrator" of the whole system. For more info about services design, and DDD - and how to use Delphi to write such backends, see https://synopse.info/files/html/Synopse mORMot Framework SAD 1.18.html#TITL_68
  15. Remy Lebeau

    Good design for "file was just saved" message

    What about using a single TButton with its Style set to bsSplitButton and a DropDownMenu assigned? The button could default to "Open", but the drop-down menu could have other actions for the user to choose from. Here is rough mockup of it (I don't have access to a working IDE at the moment):
  16. Dear all, I'm still upgrading my older projects from 10.3.1 to 10.3.2, and try this as always as sensitive as possible. But it turns out that too many libraries under Android would have been changed. This is my orginal project loaded in 10.3.2 So I'm better off to create a complete new, empty project , and reset all my old values from 10.3.1 step-by-step. In 10.3.2 the libraries looks like this So I try to figure out what would be the best way to make such upgrades, which can be very tricky these days. I know @Uwe Raabe and his ProjectMagician, thanks for that nice tool. There are also OptionSets, MigrationTool, etc., many ways to successfully reset or completely destroy your .dproj files. I want to consider the basic steps here, and hope to get some feedback, how this can be done best (without expecting strange side-effects) in a complex world. Steps to upgrade: Backup your orignal project Create a new, empty multidevice application Remove the Mainform (Unit1) and other from the main form, this will be reset later from the older project. Save and overwrite the Project file to the same .dproj !! Make global settings in Project options\All configurations first, and try to keep minimal changes from there only In later separations of Debug or Release, these changes will be done in the respective configurations later. Adding special libraries, frameworks, etc. needed for the app Adding special ressources/images needed to deploy with the app Setup Search path, version no., bundle identifiers, entitlements, permissions, icons, etc., which shall be global for the whole app Setup special settings, like debug/release store API's, Google maps debug/release API's, etc. in the respective configurations Fixes and workarounds Add the old units and datamodules (I try to minimize these in my projects, so I usually have to add only one main form), and try to restore the old project state Refine and check the settings, and ready to debug, test and deploy This way I evaluated for myself that I have best control over all settings (and there are many which could go wrong in the cross-platform world). Is there probably a better way to automate this process ( ! but please consider that many features might have large incompatibilities from 10.3.1 to 10.3.2), I don't really trust automatisms when it comes to such sensitive data, and when too many changes are there. Do I miss something, is there a more easy "migration tool" out there ? Would be great to hear how you do this usually, and which tools you use.
×