Opened 8 years ago

Closed 4 months ago

#43 closed task (fixed)

pgmodule.c needs some serious refactoring (too large)

Reported by: cito Owned by: darcy
Priority: major Milestone: 5.1
Component: DB API 2 Version: 4.1
Keywords: refactoring Cc:

Description

The pgmodule.c file now has nearly 4000 lines, that's way too much. It should be broken up - for every object implementation there should be only one file.

Change History (6)

comment:1 Changed 7 years ago by darcy

  • Milestone changed from 4.1 to 4.2
  • Version changed from 4.0 to 4.1

comment:2 Changed 4 years ago by cito

  • Milestone changed from 4.2 to 5.0

comment:3 Changed 4 years ago by cito

  • Milestone changed from 5.0 to 5.1

comment:4 Changed 4 years ago by cito

We are now at 5700 lines.

We may also consider merging redundant code. Currently, pgdb and pg use different objects implemented ni C with different functionality. Or in reverse, we could consider splitting the code into two different C extensions.

Also, the C extension should get its own unit test module.

comment:5 Changed 4 months ago by cito

After the file has now grown to 6300 lines, I have split it into 7 parts now in r986.

They still form a single compilation unit.

The objects in the C extension, the module level functions and the DB wrapper are already tested separately. I don't think we need an additional test module.

comment:6 Changed 4 months ago by cito

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.