mirror of
https://github.com/Adaptix-Framework/AdaptixC2
synced 2026-06-08 10:20:39 +00:00
b037a729cd
Optimize client-server log synchronization performance with batch processing. Server-side changes: - Add TYPE_SYNC_BATCH (0x14) packet type - Implement batch transmission in TsSyncStored() (BATCH_SIZE=100) - Add SyncPackerBatch structure for batch packets - Add performance monitoring with timing logs Client-side changes: - Add TYPE_SYNC_BATCH packet type definition - Implement batch packet validation in isValidSyncPacket() - Add batch processing logic in processSyncPacket() - Optimize UI updates with setUpdatesEnabled() for batch operations - Add sync performance tracking and display Performance improvements: - Reduce WebSocket calls from N to N/100 (99% reduction) - Reduce UI update operations by 99% - Expected sync time for 3000 logs: 6s -> 1.5s (75% improvement) Related issue: Slow sync performance with 3000+ logs
41 lines
847 B
C++
41 lines
847 B
C++
#ifndef ADAPTIXCLIENT_DIALOGSYNCPACKET_H
|
|
#define ADAPTIXCLIENT_DIALOGSYNCPACKET_H
|
|
|
|
#include <main.h>
|
|
|
|
class CustomSplashScreen : public QSplashScreen
|
|
{
|
|
Q_OBJECT
|
|
|
|
protected:
|
|
void mousePressEvent(QMouseEvent *event) override {
|
|
event->ignore();
|
|
}
|
|
|
|
void keyPressEvent(QKeyEvent *event) override {
|
|
event->ignore();
|
|
}
|
|
};
|
|
|
|
class DialogSyncPacket
|
|
{
|
|
QLabel* logNameLabel = nullptr;
|
|
QLabel* logProgressLabel = nullptr;
|
|
QProgressBar* progressBar = nullptr;
|
|
QVBoxLayout* layout = nullptr;
|
|
|
|
public:
|
|
CustomSplashScreen* splashScreen = nullptr;
|
|
int totalLogs = 0;
|
|
int receivedLogs = 0;
|
|
qint64 startTime = 0;
|
|
|
|
explicit DialogSyncPacket();
|
|
~DialogSyncPacket();
|
|
|
|
void init(int count);
|
|
void upgrade() const;
|
|
void finish() const;
|
|
};
|
|
|
|
#endif |