2010-12-04

SynScaleMM - a multi-thread scaling Memory Manager

We just released a new unit to the source code repository.

It's a simple, small and compact MM, built on top of the main Memory Manager(FastMM4 is a good candidate, standard since Delphi 2007), architectured in order to scale on multi core CPU's (which is what FastMM4 is lacking).

Original code is ScaleMM - Fast scaling memory manager for Delphi by André Mussche.

Continue reading

When inlining works

It was told on this Blog that the Delphi memory manager (FastMM4 since Borland 2006 - but it was even worse with the previous "Borland's" MM), doesn't scale well on multi-code CPU. That is, if you have a multi-threaded application with a lot of memory handling (e.g. aString := aString+someString), the Delphi MM won't scale with multi cores. When I mean "don't scale", I mean that the optimistic though of "my CPU has 4 cores, therefore the same work run in 4 threads will be 4 times faster than with 1 thread" is false. It performs even worse with multiple threads than with 1 thread...

So we went into forking a nice project, named ScaleMM, and created our scalable optimized MM, named SynScaleMM. Our forked modifications were even included in the main ScaleMM branch.

During my profiling of our SynScaleMM, I discovered some very nice results with Delphi compiler inlining features.

Continue reading

2010-10-28

"has many" and "has many through" relationships

Extracted from wikipedia, here is a definition of 'many to many' relationships in regular database management:

In systems analysis, a many-to-many relationship is a type of cardinality that refers to the relationship between two entities (see also Entity-Relationship Model) A and B in which A may contain a parent row for which there are many children in B and vice versa. For instance, think of A as Authors, and B as Books. An Author can write several Books, and a Book can be written by several Authors. Because most database management systems only support one-to-many relationships, it is necessary to implement such relationships physically via a third and fourth junction table, say, AB with two one-to-many relationships A -> AB and B -> AB. In this case the logical primary key for AB is formed from the two foreign keys (i.e. copies of the primary keys of A and B).

In our SQLite3 framework, we just created a dedicated class for handling such "many to many" relationships.

Continue reading

2010-10-24

Synopse PDF Engine 1.10

The Synopse PDF Engine was just released under version 1.10

This Engine is a set of units, used in our SQLite3 database framework for exporting reports in pdf format.
But these units can be used stand-alone, in order to produce pdf files from pure Delphi code.

Continue reading

2010-10-23

Synopse SQLite3 Framework 1.10 - including engine 3.7.3

The Synopse SQLite3 Database Framework was just released under version 1.10:
- internal SQLite3 database engine is updated to version 3.7.3;
- code modifications to compile with Delphi 6 compiler;
- enhancements in TSQLRestServerStatic, for easier stand-alone work of this in-memory database engine;
- new SQLite3Edit unit, for automated creation of a UI window, ready to edit any TSQLRecord, with no RAD necessary (all components are created from RTTI): think this is an ORM for User Interface.

This version compiles from Delphi 6 up to Delphi XE.

Continue reading

2010-09-20

Dll hell, WinSXS monster, and Delphi paradise

A funny and honest article on Dr Dobbs told the story of the "DLL hell" on windows.

Writing Delphi applications, in respect to needed libraries to be redistributed along with, is just paradise.

Continue reading

Synopse Big Table 1.9.2

Synopse Big Table has been updated into version 1.9.2.
Some new methods, and string key values can be safely bigger than 65535 chars now.

New benchmark available:
36 seconds for creating more than 150,000 records, storing 3 GB of data.
393 ms to create 1,000,000 records, with an associated string key.
Delphi rocks!

Continue reading

2010-09-19

Full Text Search in the database, using FTS3

Beginning with version 1.9.1 of our SQlite3 framework, you can have a direct access to the FTS3 features of the SQlite3 engine.

A FTS3 table is an SQLite virtual table that allows users to perform full-text searches on a set of documents. The most common (and effective) way to describe full-text searches is "what Google, Yahoo and Altavista do with documents placed on the World Wide Web". Users input a term, or series of terms, perhaps connected by a binary operator or grouped together into a phrase, and the full-text query system finds the set of documents that best matches those terms considering the operators and groupings the user has specified.

Continue reading

- page 44 of 52 -