Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Improve get_vts cmd response, sending the vts piece by piece. #201

Merged
merged 11 commits into from
Feb 11, 2020

Conversation

jjnicola
Copy link
Member

Before the response was a single huge xml element in a string, made before sending
which caused a huge memory consumption. Now the amount of memory used for this cmd
is quite smaller.

ospd/ospd.py Show resolved Hide resolved
ospd/ospd.py Outdated Show resolved Hide resolved
ospd/ospd.py Outdated Show resolved Hide resolved
ospd/xml.py Show resolved Hide resolved
ospd/xml.py Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Feb 10, 2020

Codecov Report

Merging #201 into master will increase coverage by 0.04%.
The diff coverage is 77.41%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #201      +/-   ##
==========================================
+ Coverage    72.6%   72.64%   +0.04%     
==========================================
  Files          16       16              
  Lines        2022     2058      +36     
==========================================
+ Hits         1468     1495      +27     
- Misses        554      563       +9
Impacted Files Coverage Δ
ospd/vtfilter.py 80.39% <72.72%> (-0.86%) ⬇️
ospd/ospd.py 74.43% <75%> (-0.16%) ⬇️
ospd/xml.py 88.73% <76%> (-6.92%) ⬇️
ospd/command/command.py 89.6% <90%> (+0.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 948efeb...670ab0a. Read the comment docs.

@jjnicola jjnicola marked this pull request as ready for review February 10, 2020 16:18
Copy link
Contributor

@bjoernricks bjoernricks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good already! Just small changes for the generator usage.

ospd/command/command.py Outdated Show resolved Hide resolved
ospd/ospd.py Outdated Show resolved Hide resolved
ospd/command/command.py Show resolved Hide resolved
…ts in

encoded strings representing an xml piece, to be sent to the client.
Before the response was a single huge xml element in a string, made before sending
which caused a huge memory consumption. Now the amount of memory used for this cmd
is quite smaller.
Copy link
Contributor

@bjoernricks bjoernricks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can address the missing items in further PRs.

@bjoernricks
Copy link
Contributor

I think you have addressed all my comments already 👍

@bjoernricks bjoernricks merged commit 67b0747 into greenbone:master Feb 11, 2020
@jjnicola jjnicola deleted the yield-vts branch June 24, 2020 10:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants