First of all, I need to apologize for the huge delay in releasing this new version. Lately, I've been kind of busy with personal matters, but always with the commitment to bringing more and more improvements to pgModeler in mind! Also, this version took a bit longer to be released due to some problems I was facing during the performance improvement, which was the main goal for this one. So, now that all the excuses and explanations were given, let's see what pgModeler 1.1.0-alpha1 has to offer.
pgModeler is now unbelievably faster!
One of the most annoying things on pgModeler for me all these years was the speed of the operations like object searching, model validation, and, mainly, database model file loading for big database models. So, during the development of this version, I decided to face the challenge of improving these three operations, so I delved into the internals of the tool looking for the major bottlenecks. After finding and selecting the more problematic ones, I took the path of rewriting some mechanics instead of trying to fix them.
The two main bottlenecks that degraded the speed of the mentioned operations were the objects' name validation/formatting as well as the retrieval of objects' dependencies and references. Those seemed simple operations that I even could imagine that they were making pgModeler struggle to handle big models. For the objects' name formatting and validation, I decided to create an internal name cache to avoid calling those procedures repeatedly. A simple solution that brought a surprisingly good result.
For the objects' dependencies and reference handling, I completely ditched the routines written for that purpose and created something infinitely simpler. Instead of calling every time a procedure that runs countless loops and recursive calls, I just made the objects store internally which other objects are their references and dependencies. Those changes made models that were loading/validating in several minutes to be processed in a few seconds. I still have some other bottlenecks to solve, but with those two already removed, pgModeler has now an amazing performance. To give an idea, I used three of the heavier models I have in my development environment, real-world cases kindly handed over by some users. The results obtained were the following:
|68241||18987||7m 07s||1m 09s|
|449047||93226||4h 55m 40s||1h 00m 33s|
Those results were retrieved on openSuse Leap 15.5 powered by an Intel Core email@example.comGHz with 32 GB RAM. But on the latest macOS running on a Mac Mini M2, the results were surprisingly ~20% better!
Redesigned table editing form
Attending to lots of requests, the table, view, and foreign table editing forms were redesigned in such a way as to move the general attributes of these objects to a dedicated tab in the editing form. This allowed the tabs that store child objects like columns, constraints, triggers, etc., to be reallocated as well so the objects could be better displayed mainly on small screens.
New InkSaver theme for optimized printing
For those who constantly need to print database models designed in pgModeler, there was an important improvement in this version: the InkSaver theme. As the name suggests, this theme was designed to have a limited color set (actually black & white) and can be useful when printing models to be used in academic papers or any other type of printed documentation.
Currently, this theme does not replace tag object colors, schema rectangle colors, and relationship line colors. If you have a model in which you want to use the InkSaver theme you have to make some adjustments. For pgModeler 1.1.0-beta I intend to add some quick actions to deactivate custom colors of the mentioned objects to follow the color pattern adopted by the theme.
Improved changelog visualization
The changelog visualization widget received a bunch of improvements that include an overview of the number of operations performed over the current database model and a way to make some deep inspection in the changelog entries. In that case, if the user clicks the Inpsect button it will be presented to a data grid with user-friendly information about all the actions taken in the model.
Resizable text boxes
This feature is one that I really wanted to implement earlier. Despite its simplicity, it has a considerable impact on how text boxes are created in the model. If you use text boxes to document tables and other aspects of the database model like me you already know that until pgModeler 1.1.0-alpha these objects had a fixed size determined by the number of line breaks that the documentation text had. Relying on line breaks to determine the size of text boxes was pretty annoying because forced the user to create lines with fixed widths so the text box could have the desired width and height in the model, and depending on the size of the type text this operation could be really tedious.
So, finally, in 1.1.0-alpha1, text boxes can be freely resized without the use of line breaks in the text. First of all, when creating a new text box just type the text the way you want and pgModeler will take care of the rest. The initial width of the object will be defined by the width of the text input in the text box editing form. Once the object is created, just click it in the canvas area (keeping the left mouse button pressed), hold Shift, and move the cursor to determine a new width for the text box. The only downside of this new feature is that you can't freely resize the text box in both dimensions (width and height) because the height is determined based on the width specified by the user during the resize movement as you can see in the animation below.
Resume DB management with SQL session plugin
Another feature that I wanted to see in pgModeler mainly because it was that constantly affected me was a way to avoid losing the typed SQL commands and the currently browsed databases in Manage view. So I decided to create a plugin available in the paid version of the tool that allows one to restore the previous session in database management view. This plugin basically, prior to exiting the tool, saves in a dedicated configuration file all details about the currently opened SQL execution tabs and the typed commands as well as the browsed databases. After running pgModeler again the user just needs to click one button to restore the previous session instead of going through the tedious task of browsing each database and loading all previously saved commands in the SQL execution widget (if that was the case). This is a simple enhancement that brings a huge productivity impact!
Miscellaneous fixes and changes
- Added support for using object comments as aliases in database import.
- pgModeler now asks the user about closing SQL execution tabs that are not empty (with typed commands).
- Add support for remembering decisions on the alerts regarding unsaved models/open SQL tabs.
- Added an option in the general config widget to reset the exit alert display status.
- Added missing multirange types.
- Improved the relationship point addition and selection via mouse clicks.
- The "dot" grid mode is now the default in the appearance.conf file due to better drawing performance.
- Improved the scene background (grid, delimiter, limits) drawing speed for big models.
- Improving the objects' filtering in reverse engineering by introducing an "any" filter type.
- Data manipulation form now shows a confirmation message before closing when items are pending save.
- Minor fix in the object finder widget to avoid disconnecting a null selection which could lead to crashes.
- Minor fix in the database model widget to hide the new object overlay when moving a selection of objects in the design area.
- Minor fix in the object removal routine in a model widget that was not erasing an object in case it shared the same name as other objects in the same schema.
- Minor fix in the object addition routine to validate the layer of the object being added. If one or more layers are invalid the object will be moved to the default layer 0.
- Minor fix in pgmodeler-cli when extracting the objects' XML code during model file structure repair to restore correctly the layers name/count.
- Fixed a bug in partial reverse engineering that was not correctly importing functions in some specific conditions.
- Fixed a bug in partial reverse engineering that was not importing some objects' dependencies correctly.
- Fixed a bug in the appearance configuration widget that was not updating the example model colors when changing the UI theme.
- Fixed a crash when double-clicking the overview widget.
- Fixed the data dictionary schema files for tables and views.
- Fixed a bug in the database model that was causing FK relationships of a hidden layer to be displayed after loading the model.
- Fixed a bug in the scene move action that was causing the grid to not be displayed after a panning/wheel move.
Let's support pgModeler?
If you like the work that is being done to create a quality database design tool, please become our sponsor on GitHub. Any open-source project needs financial support to keep the development alive, and this is not different with pgModeler. Go ahead, be a supporter in one of the offered sponsor tiers, and receive rewards for being a friend of an open-source project! :D
Well, that's it! If you want to check the whole list of bugfixes and improvements in this version, please, refer to the CHANGELOG.md file. Also, leave your thoughts about this new version in the comments section, and don't forget that any bug and feature request can be registered on GitHub, these kinds of feedback helps a lot in the enhancement of the tool! Finally, follow pgModeler on X or join the telegram channel @pgmodeler for first-hand news about the project!
See you next time! ;)