Performance improvements

Created on 19 July 2023, over 1 year ago

Problem/Motivation

After installing the module and encrypting certain user fields (about 20% of user fields, so not all and not translatable) our site took a huge performance hit (CPU usage and load time). The site become basically useless when dealing with the encrypted entities with the previous server and we migrated to a bigger one. This still didn't fix the performance issue, which is the way encrypted entities are loaded.

I can't figure out what could be done to improve the performance (we have 3.1 module version with Redis and php-fpm setup) and I think we should have a open discussion what could be done.

The questions to answer, which I can't figure out when looking at the code are:

  • Why loading/storing one NOT encrypted field is also slow?
  • What can be done to improve the performance in general?
  • What strategies can be done outside field_encrypt module to improve performance?

Steps to reproduce

  1. Install the module.
  2. Set AES 256 Encryption to any one field in (user) entity.
  3. Edit any individual entity field data - encrypted or not.

Proposed resolution

  1. Specify all measures that impact performance.
  2. Estimate the impact of each improvement.
  3. Create an issue of each individual improvement.
  4. Implement the improvements starting from the one that has the biggest impact on performance.

Already addressed issues:

Remaining tasks

Data model changes

💬 Support request
Status

Active

Version

3.1

Component

Code

Created by

🇩🇪Germany TipiT Hamburg

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @TipiT
  • Status changed to Postponed: needs info 3 months ago
  • 🇯🇵Japan ptmkenny

    Were you able to identify specific performance bottlenecks in the module code?

    One thing you can do to improve performance is to turn eval off and add the entity decrypt hooks manually. See "Dynamic entity hooks" in the README.

Production build 0.71.5 2024