The particle/hair system is quite expensive to export if using many particles/particle systems. If no edits have been made to the particle system, it would be very cool if the previous exported files could be used instead of writing new ones. Such as the edited flag on mesh objects. This would speed up exporting a lot while we wait for 2.8.

it would be very cool if the previous exported files could be used instead of writing new ones.

Unforunately we can't get much faster in Python, I fear.
How the particle export works in LuxBlend:

Export the mesh that will be instanced

Export the object definitions for all the particles (using the mesh from the first step)

So we are already caching the expensive mesh export.
But if you export 10,000 particles or so, creating the object definitions alone takes up a lot of time.

edit: Ah, I think I get what you mean: save the object definition properties (pyluxcore.Properties()) to a cache and re-use them.
We can try that but I'll have to see if we can reliably check if the particle system changed.

The "hair" format can potentially be used for particles too. The idea is to be able to define all particles with just one single call by passing a mesh (i.e. the particle) and the list of particles transformations.

How does Blender particles work ? Do you have a single definition of the particle mesh ?

So the particles are all the same mesh/material aside from the transformation matrices and can be exported as a single mesh plus a list of transformations. I think we can have a quite fast path for this special case.

I'm thinking to this solution:

1) you create an object representing the first particle as usual.

2) I add a new method to the LuxCore API to duplicate an existing object (i.e. the first particle) as many times as you want by providing a list of transformation matrices.

It should be very fast: the cost of creating a single object + one more call to the "duplicate" function (from there it is my problem to run fast but it is all C++ and multi-threading is an option too).

How does it sounds ?

P.S. As usual if the particle is made of multiple materials, the above steps have to be repeated for each material.

By the way: always funny when Blender OpenGL viewport lags and LuxCore viewport render is fluid

Ahah

(Jokes aside, an old argument in the "Rasterization" Vs "Ray tracing" battle has always been that ray tracing is O(log n) with the objects to render while rasterization is (mostly) O(n). So, first or later, ray tracing is always going to be better)