Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Performance bottleneck with EclipseLink(Performance bottleneck with EclipseLink )
Performance bottleneck with EclipseLink [message #896885] Fri, 20 July 2012 09:57 Go to next message
Khurshed Salimov is currently offline Khurshed SalimovFriend
Messages: 7
Registered: July 2012
Junior Member
Recently while I was using EclipsLink 2.0 I run into performance bottleneck problem with my implementation of persisting objects.

To be more specific I used to have the following implementation:

@Entity
@Table(name = "CUSTOMERS") public class CustomerEntity implements Serializable {

@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private volatile Long id;

@Column(nullable = false, unique = true)
private String name;
private static final long serialVersionUID = 6952530957072210017L;

private String custGroup;
private String address;
private String nameOfFirstPerson;
private String contactPerson;
private String phone;
private String fax;
private String email;
private String comments;
private String defaultCustomer;
private volatile boolean delayedPaymentAllowed;
private volatile long periodOfDelayedPaymentAllowed;
private volatile boolean restrictionsOnDelayedPayment;
private volatile double maxAmoutPemittedSom;
private volatile double maxAmoutPemittedYE;
private transient String salesPointName;

@Column(length=25483)
private HashMap<String, PriceItem> totalBalance;

@Column(length=25483)
private HashMap<String, PriceItem> totalBalanceUsd;

private transient boolean valueChanged = false;


@OneToMany(mappedBy = "supplier")
private Collection<PurchaseInvoiceEntity> purchaseInvoices;

@OneToMany(mappedBy = "receiver")
private Collection<SalesInvoiceEntity> salesInvoices;

@OneToMany(mappedBy = "payer")
private Collection<PayInSlipEntity> payInSlips;

@OneToMany(mappedBy = "recipient")
private Collection<PaymentOrderEntity> paymentOrders;

@OneToMany(mappedBy = "recipient")
private Collection<WriteOffEntity> writeOffs;

@ManyToOne()
private ResponsiblePersonForDebtEntity responsiblePersonForDebt;

@ManyToOne
private CustomerGroupEntity customerGroup;


public CustomerEntity() {

valueChanged = false;
}
... }



Re: Performance bottleneck with EclipseLink [message #896886 is a reply to message #896885] Fri, 20 July 2012 09:58 Go to previous message
Khurshed Salimov is currently offline Khurshed SalimovFriend
Messages: 7
Registered: July 2012
Junior Member
n order to tackle the problem I simply applied the following solution:

I simply removed document references :

@OneToMany(mappedBy = "supplier") private Collection purchaseInvoices;

@OneToMany(mappedBy = "receiver") private Collection salesInvoices;

@OneToMany(mappedBy = "payer") private Collection payInSlips;

@OneToMany(mappedBy = "recipient") private Collection paymentOrders;

@OneToMany(mappedBy = "recipient") private Collection writeOffs;

from the CusotmerEntity:

@Entity
@Table(name = "CUSTOMERS") public class CustomerEntity implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private volatile Long id;
@Column(nullable = false, unique = true)
private String name;
private static final long serialVersionUID = 6952530957072210017L;
private String custGroup;
private String address;
private String nameOfFirstPerson;
private String contactPerson;
private String phone;
private String fax;
private String email;
private String comments;
private String defaultCustomer;
private volatile boolean delayedPaymentAllowed;
private volatile long periodOfDelayedPaymentAllowed;
private volatile boolean restrictionsOnDelayedPayment;
private volatile double maxAmoutPemittedSom;
private volatile double maxAmoutPemittedYE;
private transient String salesPointName;
@Column(length = 25483)
private HashMap<String, PriceItem> totalBalance;
@Column(length = 25483)
private HashMap<String, PriceItem> totalBalanceUsd;
private transient boolean valueChanged = false;
@ManyToOne()
private ResponsiblePersonForDebtEntity responsiblePersonForDebt;
@ManyToOne
private CustomerGroupEntity customerGroup;

public CustomerEntity() {

valueChanged = false;
}
.....}



while checking for references for the documents I used JPA query while editing or deleting CustomerEntity.
This simple change removed the most affecting performance problem.

Side Note:

Please while using performance profiler include a check for package methods too(eclipslink for ex.)
Previous Topic:cannot use eclipselink 2.x
Next Topic:Problem with 2.4 and Sybase drivers
Goto Forum:
  


Current Time: Fri Apr 26 20:18:05 GMT 2024

Powered by FUDForum. Page generated in 0.02834 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top