process logs in backword?

C

Colin Song

Hi,all
My serverlet need save some logs to DB,I want to reduce the
response time,so I use threadpool to save the logs,
but the performance is not good.And I find use 1 thread to save logs
have best performance,but some logs will delayed.
Is there another solution?
Thanks.
 
D

Daniel Pitts

Colin said:
Hi,all
My serverlet need save some logs to DB,I want to reduce the
response time,so I use threadpool to save the logs,
but the performance is not good.And I find use 1 thread to save logs
have best performance,but some logs will delayed.
Is there another solution?
Thanks.
Make sure you are using proper synchronization. You might also have a
timestamp field in the DB to manage the time that the logged event occurs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top